Javascript bookmarklet to save YouTube videos

Written September 4. 2006, at 23:27 GMT.

Here's the code I came up with today:

javascript:if(/youtube\.com\/watch\?/.test(document.location)){document.location="http://www.youtube.com/get_video?"+document.body.innerHTML.match(/player2\.swf\?.*?(video_id=[^"]+)/)[1];}

Right-click and "Bookmark this link..." Save YouTube Video

The videos come in a ".FLV" format which can, for example, be played with the free VLC media player.


More like this: English Entries, Javascript.


Reader Comments (6)

  1. Jói replies:

    How is this supposed to work? Nothing happens on my end...

    September 6. 2006 kl. 15:58 GMT | #

  2. Jói replies:

    How is this supposed to work? Nothing happens at my end...

    September 6. 2006 kl. 15:59 GMT | #

  3. Már replies:

    @Jói, here how:

    1. Visit a YouTube video page (example).
    2. Activate (click!) the "Save YouTube Video" bookmarklet.
    3. Wait while the browser connects to the server and then prompts you with a "Save file" dialog window.

    Admiddedly I've only bothered to test the bookmarklet on Firefox and IE6. Your milage may vary.

    September 7. 2006 kl. 09:34 GMT | #

  4. Salvör replies:

    Ég hef bent fólki á ađ nota http://javimoya.com/blog/youtube_en.php til ađ hlađa niđur youtube hjá mér.

    September 8. 2006 kl. 15:27 GMT | #

  5. Jói replies:

    Got it to work, the problem was my Firefox, apparently I was using some old version not compatible with this workaround. Thanks for this useful and handy tool!

    September 8. 2006 kl. 16:37 GMT | #

  6. Chupong replies:

    Thanks man. Nice clean and short. This's really work while YouRipper software don't.

    October 2. 2006 kl. 14:24 GMT | #

Ţessum svarhala hefur veriđ lokađ. Kćrar ţakkir til ţeirra sem tóku ţátt í umrćđunni.


 

Flakk um vefsvćđiđ



 

Nýleg svör frá lesendum

  • Rich (Req.js - javascript lazy-loading and dependency managment made easy)
  • Rich (Req.js - javascript lazy-loading and dependency managment made easy)
  • Rich (Req.js - javascript lazy-loading and dependency managment made easy)
  • Már (Req.js - javascript lazy-loading and dependency managment made easy)
  • Rich (Req.js - javascript lazy-loading and dependency managment made easy)
  • Már (Req.js - javascript lazy-loading and dependency managment made easy)
  • Dinesh (Req.js - javascript lazy-loading and dependency managment made easy)
  • Már (Taubleyjur í nútímanum - lítill leiđarvísir handa hrćddri ţjóđ)
  • Ada (Taubleyjur í nútímanum - lítill leiđarvísir handa hrćddri ţjóđ)
  • notandi (Taubleyjur í nútímanum - lítill leiđarvísir handa hrćddri ţjóđ)
  • Geir (Lausnin á efnahagsvandanum)
  • Jenný (Lausnin á efnahagsvandanum)
  • Óli Jens (Lausnin á efnahagsvandanum)
  • Már (Lausnin á efnahagsvandanum)
  • Kjartan S (Lausnin á efnahagsvandanum)

 

 

Yfirlit yfir ţetta skjal

(Atriđin í listanum vísa á ákveđna kafla ofar á síđunni.)