Aug 20 2007
perl + wget = youtube anywhere
Here’s a modified version of marginalhacks.com’s myfilm.pl script specifically for the 770. The basic idea is so:
1. Go to youtube.com and browse around. Ignore all the flash incompatibility errors and just read titles and look at the thumnails.
2. Bookmark any vid you’re interested in by ‘right-click’.
3. Run the script from osso-xterm with the -s switch (check –help to find out more)
It will scan your bookmarks.xml file and grab the appropriate links, deobfuscate them, find the .flv file and download it to the 770’s default video folder (/home/user/MyDocs/.videos/). It also nicely checks to see if you’ve already downloaded the video and will skip it if you have.
4. Fire up mplayer whenever you want to watch em! gmplauncher will list all videos (in .videos/) automagically.
5. Eventually erase your youtube bookmarks and have another go.
Someday perhaps I’ll have the patience to figure out how to de-fuck the .xml file.. Opera does a terrible job of creating it. You’ll notice if you delete the MyBookmarks.xml file it will recreate itself. Looking at it in your favorite editor, it looks quite nice…until you make a new bookmark. It jams half of it on one line, preferring to make the linebreak after favicon instead of at the end of . I have no idea why. This requires a little more sed trickiness than I understand atm.
Anyhow, without further ado here’s the links and install instructions:
Make sure wget is installed (download here )
Download this script
Put it wherever you want to run it from. If you’re new to linux and have gotten this far, the end is in sight. Run this command in your terminal:
chmod a+x myfilm.pl
(and if you have bookmarked some films, run this to try it out:)
./myfilm.pl -s
Thanks to Dave over at marginalhacks.com for the original myfilm.pl and help from folks on #regex/freenode.
One Response to “perl + wget = youtube anywhere”
Leave a Reply
You must be logged in to post a comment.
Not A Member? Register for Free!






Yeah, dont copy/paste that. download the file instead, there’s tons of formatting errors in that…