| Author |
Message |
|
fomenta
n00bfest Elder, Lead Developer
Joined: Sun May 24, 2009 11:00 pm Posts: 2766 Location: Gettin it in
|
 Download Youtube Videos as MP3s
So there's this site youtube-mp3.com that extracts the audio from youtube videos and lets you download the mp3. I use it a ton. So the other day I wrote a greasemonkey script that would put a little icon on youtube pages that would take you directly to the mp3 download page. See: Attachment:
yt2mp3.PNG [ 142.87 KiB | Viewed 2800 times ]
And that link takes me to this page. It has worked without issue for a few weeks so I'll post it here in case anyone is interested. To use, just install greasemonkey, and install the script below. The greasemonkey link I posted is for firefox, but I'm pretty sure Chrome supports it too and apparently, Chrome 4 supports GM scripts natively without the need for an addon. Anyway, after you install greasemonkey (and in firefox, restart your browser), you can install the script by clicking here. If you're curious/paranoid, the source is below. ♥ fomenta Code: // ==UserScript== // @name Youtube-to-mp3 Link // @namespace n00bfest.com // @include http://www.youtube.com/* // @version 1 // ==/UserScript==
var $;
// Add jQuery (function(){ if (typeof unsafeWindow.jQuery == 'undefined') { var GM_Head = document.getElementsByTagName('head')[0] || document.documentElement, GM_JQ = document.createElement('script');
GM_JQ.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'; GM_JQ.type = 'text/javascript'; GM_JQ.async = true;
GM_Head.insertBefore(GM_JQ, GM_Head.firstChild); } GM_wait(); })();
// Check if jQuery's loaded function GM_wait() { if (typeof unsafeWindow.jQuery == 'undefined') { window.setTimeout(GM_wait, 100); } else { $ = unsafeWindow.jQuery.noConflict(true); letsJQuery(); } }
// http://stackoverflow.com/questions/901115/get-query-string-values-in-javascript function getParameterByName(name) { name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); var regexS = "[\\?&]" + name + "=([^&#]*)"; var regex = new RegExp(regexS); var results = regex.exec(window.location.search); if(results == null) return ""; else return decodeURIComponent(results[1].replace(/\+/g, " ")); }
// All your GM code must be inside this function function letsJQuery() { //icon = '<img src="http://a.dryicons.com/images/icon_sets/coquette_part_6_icons_set/png/32x32/mp3_file.png">'; var icon = '<img src="http://cdn.last.fm/favicons/itunes16x16.png">'; // Extract v param var key = getParameterByName('v'); // Build Download Link var link = 'http://www.youtube-mp3.org/#v=' + key; title = $('h1#watch-headline-title'); title.append('<a href="'+ link +'">' + icon + '</a>'); }
_________________
|
| Sun Jul 08, 2012 5:12 pm |
|
 |
|
Luke
[n00b] Member
Joined: Wed Nov 09, 2011 10:28 pm Posts: 1295
|
 Re: Download Youtube Videos as MP3s
Works great, thanks.
_________________ Lots of people have birthdays in early November. I like to think that it's because their parents fucked on Valentine's day.
"OH BABY YOU BOUGHT ME A HALLMARK CARD AND SOME F*CKING ROSES. PLEASE BUST A LOAD IN MY SNATCH AND LET'S MAKE A CRITTER" "LOL K" *SPLAT* -Gman
|
| Sun Jul 08, 2012 5:21 pm |
|
 |
|
Tazzaler
[n00b] Member
Joined: Wed Jul 23, 2008 11:00 pm Posts: 5727 Location: Dakota, North
|
 Re: Download Youtube Videos as MP3s
Do you know if the site automatically pulls the highest quality audio stream (i.e. the 1080p stream over the 360p stream)?
_________________
|
| Sun Jul 08, 2012 6:11 pm |
|
 |
|
Montreal
[n00b] Member
Joined: Fri Aug 21, 2009 3:46 am Posts: 2623 Location: Montreal, Canada
|
 Re: Download Youtube Videos as MP3s
Tazzaler wrote: Do you know if the site automatically pulls the highest quality audio stream (i.e. the 1080p stream over the 360p stream)? I was going to ask the same question. I'm going to be using this a lot, thanks!
_________________
|
| Sun Jul 08, 2012 8:50 pm |
|
 |
|
fomenta
n00bfest Elder, Lead Developer
Joined: Sun May 24, 2009 11:00 pm Posts: 2766 Location: Gettin it in
|
 Re: Download Youtube Videos as MP3s
Tazzaler wrote: Do you know if the site automatically pulls the highest quality audio stream (i.e. the 1080p stream over the 360p stream)? I dunno man, its kind of hard to tell. I get like 1MB / min for the files I download and they're 128 kbps CBR.
_________________
|
| Sun Jul 08, 2012 9:09 pm |
|
 |
|
virus
[n00b] Member
Joined: Thu Feb 23, 2006 12:00 am Posts: 1918 Location: Miami, FL
|
 Re: Download Youtube Videos as MP3s
|
| Sun Jul 08, 2012 9:18 pm |
|
 |
|
NAsHViLLE
[n00b] Member
Joined: Tue Nov 29, 2011 3:08 pm Posts: 216
|
 Re: Download Youtube Videos as MP3s
use this all the time as well. its pretty badass
_________________In actual news, the human race was doomed to extinction today, as the robot revolt turned violent.
WHAT UP NOW SWEDES!!!!!!!!!! http://www.youtube.com/watch?v=TXh1sKkcYb8
|
| Sun Jul 08, 2012 9:18 pm |
|
 |
|
Tazzaler
[n00b] Member
Joined: Wed Jul 23, 2008 11:00 pm Posts: 5727 Location: Dakota, North
|
 Re: Download Youtube Videos as MP3s
fomenta wrote: Tazzaler wrote: Do you know if the site automatically pulls the highest quality audio stream (i.e. the 1080p stream over the 360p stream)? I dunno man, its kind of hard to tell. I get like 1MB / min for the files I download and they're 128 kbps CBR. I guess in the end it doesn't matter because they're going to be 128kbs no matter the fact. It'd just be interesting what the source audio they use. Might have to run some tests to see; as in play the audio I get from the program vs the audio playing straight from the youtube video playing in "HD".
_________________
|
| Sun Jul 08, 2012 9:20 pm |
|
 |
|
Fird
[n00b] Member
Joined: Mon Jun 04, 2012 10:09 am Posts: 696 Location: Texas
|
 Re: Download Youtube Videos as MP3s
♥ that u leave comments
_________________
|
| Sun Jul 08, 2012 10:30 pm |
|
 |
|
-Purple-
Game Server Admin
Joined: Tue Apr 01, 2008 11:00 pm Posts: 5190 Location: Vegas Baby
|
 Re: Download Youtube Videos as MP3s
The Chrome version of Greasemonkey is Tampermonkey. And the script for youtube-mp3 is here. Thanks for this awesome add-on :) Also, what is chrome 4? this is my current version of chrome, which says "up to date."
Attachments:
WhatBrowser.png [ 268.38 KiB | Viewed 2771 times ]
_________________
Last edited by -Purple- on Sun Jul 08, 2012 11:05 pm, edited 1 time in total.
|
| Sun Jul 08, 2012 10:49 pm |
|
 |
|
virus
[n00b] Member
Joined: Thu Feb 23, 2006 12:00 am Posts: 1918 Location: Miami, FL
|
 Re: Download Youtube Videos as MP3s
-Purple- wrote: what is chrome 4? this is my current version of chrome, which says "up to date." Maybe he means since version Chrome 4 (16 versions behind the one your currently at)?
|
| Sun Jul 08, 2012 10:57 pm |
|
 |
|
Euphoria
[n00b] Member
Joined: Sun Mar 18, 2012 5:32 pm Posts: 131 Location: Earth
|
 Re: Download Youtube Videos as MP3s
Just the fact you showed a song from one of MrSuicideSheep's channels makes you AWESOME by tenfold.
_________________
|
| Sun Jul 08, 2012 11:39 pm |
|
 |
|
fomenta
n00bfest Elder, Lead Developer
Joined: Sun May 24, 2009 11:00 pm Posts: 2766 Location: Gettin it in
|
 Re: Download Youtube Videos as MP3s
lol I dunno what Chrome 4 is -- I googled something like "greasemonkey chrome" and found this article skimmed it and wrote that. Looking at it again, its from 2010 so who knows. Its pretty cool theres the same extension for chrome already written. I actually end up doing things myself WAYYY more than I need to when I could spend like 1/4 of the time searching and finding something that was already written. I didn't look, but the script was prob already written for FF, maybe even better. PS Thanks to virus for liking this website and then back a few months ago when I searched for something like "youtube to mp3" it popped up with "<virus> I AM A HOMOSEXUAL'd this".
_________________
|
| Mon Jul 09, 2012 6:16 pm |
|
 |
|
virus
[n00b] Member
Joined: Thu Feb 23, 2006 12:00 am Posts: 1918 Location: Miami, FL
|
 Re: Download Youtube Videos as MP3s
fomenta wrote: lol I dunno what Chrome 4 is -- I googled something like "greasemonkey chrome" and found this article skimmed it and wrote that. Looking at it again, its from 2010 so who knows. Its pretty cool theres the same extension for chrome already written. I actually end up doing things myself WAYYY more than I need to when I could spend like 1/4 of the time searching and finding something that was already written. I didn't look, but the script was prob already written for FF, maybe even better. PS Thanks to virus for liking this website and then back a few months ago when I searched for something like "youtube to mp3" it popped up with "<virus> I AM A HOMOSEXUAL'd this". No problem, I tend to be gay all the time. ♥
|
| Mon Jul 09, 2012 6:18 pm |
|
 |
|
fomenta
n00bfest Elder, Lead Developer
Joined: Sun May 24, 2009 11:00 pm Posts: 2766 Location: Gettin it in
|
 Re: Download Youtube Videos as MP3s
LOLOLOL wordfilter -- of course, that was supposed to be "+1"
_________________
|
| Mon Jul 09, 2012 6:21 pm |
|
 |
|
virus
[n00b] Member
Joined: Thu Feb 23, 2006 12:00 am Posts: 1918 Location: Miami, FL
|
 Re: Download Youtube Videos as MP3s
lol it wasnt a word filter. I actually typed that.
|
| Mon Jul 09, 2012 6:32 pm |
|
 |
|
Kwang!
[n00b] Member
Joined: Mon Jun 21, 2010 6:04 pm Posts: 4413 Location: Here.
|
 Re: Download Youtube Videos as MP3s
There's another site like this, http://www.vidtomp3.com that I use when I can't find what I'm looking for on one of the legit mp3 sources I buy from (sometimes there's a particular version of a song that just doesn't seem to be available anywhere).
_________________
|
| Thu Jul 12, 2012 4:05 pm |
|
 |
|