Youtube Ripper: Collector’s Edition
Sunday, April 8th, 2007Unfortunately, this script is broken now. Youtube changed things internally and the script broke. For a working script, see this post
Today I had an interesting conversation with my fellow blogger themak and he asked if it would be possible to download a bunch of videos that he knew followed a regular naming scheme and that were uploaded by two different users. After some coding I came up with a script that will download all videos uploaded by a specific Youtube user where the title matches a pattern (regexp compatible). The final output is flash videos named after the unique video ID.
$ sh youtube-user.sh rpoland "Andy Mckee"
Would download all videos with Andy Mckee in the title listed on the user rpoland’s profile page.
Update: Mike wrote a PHP port!
Update again: Regarding the Digg comments, the script now works with all profile pages and I re-wrote it to feature functions instead of one big one-liner.
Hopefully last update: Fixed the last regexp flaws and removed a flag to xargs that stopped it from running on OS X. Also added a dry-run mode.