Coredump

Work, play, and everything in-between.

Snag movie audio tracks

without comments

Okay, watching movies in the workplace is a definite no-no, but they didn’t say anything about listening to movies. But I’d rather do it offline, so I whipped up a little bookmarklet that will snag the .MP3 URL off the movies I chose.

  1. First off, select a movie from the list.
  2. Then list all the URLs in that page by using Javascript’s document.links object.
  3. I noticed that the URI for the MP3 link is always the ninth, so just get the ninth URL: document.links[8].href.
  4. Using a regular expression, winnow the URL:
    document.links[8].href.replace(new RegExp('[?&=]','g'),' ').split(' ')[2]
  5. Drop in the javascript resource header, and voila! here’s the bookmarklet that will grab audio track’s URL for download. Right-click and bookmark the link. Or, drag and drop the link to the bookmarks toolbar.

Read more:

Written by Ian Dexter

February 28th, 2007 at 12:51 pm

Posted in Play

Tagged with , ,

Leave a Reply