One of the first things I tried (which I thought would be harder) was “Write a Python program that accepts a YouTube url and a start and stop time in the form MM:SS and a file name and it extracts the video between those times and converts it to an animated gif. Also provide a list of packages to be installed.”
The resulting code worked. Took an interaction or two to add usage info and tweak things, but it’s a neat little utility. Due to the libraries used, it was also simpler than I expected and would have been easy to write if I knew about those libs, so I also learned something.
It’s just one or two steps away from just saying “Go to this YouTube URL and extract the video between 3:20 and 3:27 into an animated GIF named ‘CatAndRaccoon.gif’” and having it write, debug, and execute the code.
Comments
One of the first things I tried (which I thought would be harder) was “Write a Python program that accepts a YouTube url and a start and stop time in the form MM:SS and a file name and it extracts the video between those times and converts it to an animated gif. Also provide a list of packages to be installed.”
The resulting code worked. Took an interaction or two to add usage info and tweak things, but it’s a neat little utility. Due to the libraries used, it was also simpler than I expected and would have been easy to write if I knew about those libs, so I also learned something.
It’s just one or two steps away from just saying “Go to this YouTube URL and extract the video between 3:20 and 3:27 into an animated GIF named ‘CatAndRaccoon.gif’” and having it write, debug, and execute the code.