Subscribe
Follow @shai_rai
Couple of days ago I wrote about how to download YouTube movies to your machine using JavaScript, The solution I showed didn’t worked for all browsers because Cross Scripting blocks in some browsers.
But don’t worry, there is always a way!
I’ve toke the same script I’ve used in the YouTube download tool and add a “JavaScript :” before the script so it can be used directly from the YouTube page.
All you need to do is enter the desire YouTube video and click the bookmark or just paste the entire script in the address bar. (Don’t forget the JavaScript : before the script)
*** Remove “Space Char” after the “javascript” ***
javascript :isIE=/*@cc_on!@*/false;isIE ? tubeDoc=document.getElementById('movie_player').getElementsByTagName('param')[1].value:tubeDoc=document.getElementById("movie_player").getAttribute("flashvars");w=tubeDoc.split("&");for(i=0;i<=w.length-1;i++)if(w[i].split("=")[0] == "url_encoded_fmt_stream_map"){links=unescape(w[i].split("=")[1]);break;}splitValues = links.split(",url=");for(i=0;i<=splitValues.length-1;i++){val=splitValues[i].split("|")[0];if ((val.indexOf("flv") > 0) && (val.indexOf("large") <= 0) && (val.indexOf("medium") <= 0)){if (val.indexOf("rl=") > 0){url = val.substring(4,val.indexOf("fallback_host")-1);url = unescape(unescape(url));break;}else{url = val.substring(0,val.indexOf("fallback_host")-1);url = unescape(unescape(url));break;}}}combineurl = url;combineurl = combineurl + '&title=' + document.title;window.location.href = combineurl;
No Comments