Posted by Andrew.
YouTube is a video sharing website on which users can upload and share videos, uses Adobe Flash Video technology to display a wide variety of user-generated video content, including movie clips, TV clips, and music videos, as well as amateur content such as video blogging and short original videos.
If you want to download YouTube Video/Movie in Google Chrome, you can try following Bookmarklet (Javascript plugins), it will instantly get the video URL from the webpage even if it's not yet finished loading. No Website or software is needed. It's a bookmarklet(a bookmark containing JavaScript) in practice, you can also use it in FireFox, Safari or Inetnet Explorer.
Install this Javascript Plug-in is very easy, please do following steps:
1. Make sure your Google Chrome browser always shows the Bookmarks bar. You can click menu Tools -> Always show bookmarks bar, the hotkey is Ctrl + B.
2. Right click on the bookmarks bar, and then select Add Page.
3. In the Name field, enter "Download YouTube Video" or something you will remember, then for the URL field paste:
javascript:window.location.href = 'http://youtube.com/get_video?video_id=' + swfArgs['video_id']+ "&l=" + swfArgs['l'] + "&sk=" + swfArgs['sk'] + '&fmt_map' + swfArgs['fmt_map'] + '&t=' + swfArgs['t'];
Update: Nov 23, 2009: YouTube has modified the video parameters, the code above can't work now, use this:
javascript:window.location.href = 'http://youtube.com/get_video?video_id=' + yt.getConfig("SWF_ARGS")['video_id'] + "&sk=" + yt.getConfig("SWF_ARGS")['sk'] + '&t=' + yt.getConfig("SWF_ARGS")['t'];
4. Click OK button.
Now, the Javascript plugin is installed in your Google Chrome. Go to the YouTube video you want to download, when it starts playing click your "Download YouTube Video" bookmark and you will see the .flv file start to download in Google Chrome's download status bar.
Quote:
http://www.download.com/YouTube-Downloader/3000-2071_4-10647340.html?tag=mncol&cdlPid=10801797
Quote:
javascript:( function( ) { var getVideo=function( flashvars,src) { var getLink=function( s) { var rez=s.match( /[^\s\x22=&?]+\.[^\s\x22=&?\/]*( flv|mp4) /i) ; return rez?rez[0]:''} ; var getQuery=function( s,q) { var rez=s.match( new RegExp( '[&?]'+q+'=( [^&]+) ') ) ; return rez?rez[1]:''} ; var flv=decodeURIComponent( flashvars) ; var url=location.href; var q=''; if( url.indexOf( 'youtube.com/watch?') !=-1&&( q=getQuery( flv,' video_id' ) ) ) return' http://www.youtube.com/get_video?video_id='+q+'&t='+getQuery( flv,'t') +'&fmt=18'; if( url.indexOf( 'video.google.com/videoplay?') !=-1&&( q=getQuery( src,'videoUrl') ) ) return decodeURIComponent( q) ;if( url.indexOf( 'metacafe.com/watch/') !=-1&&( q=getQuery( flv,'mediaURL') ) ) return q+'?__gda__='+getQuery( flv,'gdaKey') ;if( url.indexOf( 'dailymotion.com/') !=-1&&( q=getQuery( flv,'video') ) ) return q.match( /[^@]+/) ;return getLink( flv) ||decodeURIComponent( getLink( src) ) } ;var createLink=function( l,t) { var oLnk=document.createElement( 'a') ;oLnk.setAttribute( 'href',l) ;oLnk.appendChild( document.createTextNode( t) ) ;oLnk.setAttribute( 'style','display:inline;font:14px Times New Roman;text-decoration:underline;text-transform:none;') ;return oLnk} ;var showLink=function( oEle,oSrc,oFlv) { if( !oEle||!oSrc) return;var cName='ujs_downlink';var p=oEle.previousSibling;if( p&&p.className==cName) { oEle.parentNode.removeChild( p) ;return} ;var oDiv=document.createElement( 'div') ;oDiv.setAttribute( 'style','display:block;position:static;float:none;margin:0;padding:0;z-index:999;') ;oDiv.className=cName;oDiv.appendChild( createLink( oSrc,'Download') ) ;var v=getVideo( oFlv,oSrc) ;if( v) { oDiv.appendChild( document.createTextNode( ' ( ') ) ;oDiv.appendChild( createLink( v,'Video') ) ;oDiv.appendChild( document.createTextNode( ') ') ) } ;oEle.parentNode.insertBefore( oDiv,oEle) } ;var getParam=function( e,n) { var v='';var r=new RegExp( '^( '+n+') $','i') ;var param=e.getElementsByTagName( 'param') ;for( var i=0,p;p=param[i];i++) { if( p.getAttribute( 'name') .match( r) ) { v=p.getAttribute( 'value') ;break} } return v} ;var searchEmbed=function( w) { if( !w) return;var obj=w.document.getElementsByTagName( 'object') ;for( var i=0,oi;oi=obj[i];i++) { showLink( oi,oi.getAttribute( 'data') ||oi.getAttribute( 'src') ||getParam( oi,'movie|data|src|code|filename|url') ||( oi.getElementsByTagName( 'embed') .length&&oi.getElementsByTagName( 'embed') [0].getAttribute( 'src') ) ,getParam( oi,'flashvars') ) } ;var em=w.document.getElementsByTagName( 'embed') ;for( var i=0,ei;ei=em[i];i++) { if( ei.parentNode.tagName.toLowerCase( ) !='object') showLink( ei,ei.getAttribute( 'src') ,ei.getAttribute( 'flashvars') ) } ;for( var j=0,f;f=w.frames[j];j++) { try{ arguments.callee( f) } catch( e) { } } } ;searchEmbed( window.top) } ) ( )
Quote:
javascript:var fmt=35;var success=0;var fmt_url_map = unescape(yt.getConfig("SWF_ARGS")['fmt_url_map']);var fmt_url_a = fmt_url_map.split(',');for(idx in fmt_url_a){fmt_url_a[idx]=fmt_url_a[idx].split('|');if(fmt_url_a[idx][0]==fmt){window.location.assign(fmt_url_a[idx][1]);success=1;break;}}if(success==0){var err_msg = "Video available in these formats:\n";for(idx in fmt_url_a){switch(fmt_url_a[idx][0]){case '5':err_msg+=".flv FLV1-320x240 MP3-22k-mono fmt=5\n";break;case '18':err_msg+=".mp4 H264-480x360 AAC-44k-st fmt=18\n";break;case '22':err_msg+=".mp4 H264-1280x720 AAC-44k-st fmt=22\n";break;case '34':err_msg+=".flv H264-320x240 AAC-22k-st fmt=34\n";break;case '35':err_msg+=".flv H264-480x368 AAC-44k-st fmt=35\n";break;case '37':err_msg+=".mp4 H264-1920x1080 AAC-44k-st fmt=37\n";break;default:err_msg+="unknown format fmt="+fmt_url_a[idx][0]+"\n";};};alert(err_msg);};
Quote:
javascript:(function(format){var%20levels={mp4:[37,22,18],flv:[35,34,6,5]};levels=levels[format];if(format=='mp4'){getfmt18()}else{process(yt.config_.SWF_ARGS.fmt_url_map)}function%20getfmt18(){var%20fmt18=document.createElement('iframe');fmt18.id='fmt18';fmt18.src=window.location.href+'&fmt=18';fmt18.style.display='none';if(fmt18.attachEvent){fmt18.attachEvent('onload',have18)}else{fmt18.addEventListener('load',have18,false)}document.body.appendChild(fmt18)}function%20have18(event){if(!event){event=window.event}if(!event.target){event.target=event.srcElement||document}if(event.target.detachEvent){event.target.detachEvent('onload',have18)}else{event.target.removeEventListener('load',have18,false)}process(yt.config_.SWF_ARGS.fmt_url_map+','+event.target.contentWindow.yt.config_.SWF_ARGS.fmt_url_map)}function%20process(qualities){qualities=decodeURIComponent(qualities).split(',').sort(function(a,b){return%20parseInt(b)-parseInt(a)});var%20available={};for(var%20i=0;i%3Cqualities.length;i++){var%20temp=qualities[i].split('|');available[temp[0]]=temp[1]}makeselection(available)}function%20makeselection(available){for(var%20i=0;i%3Clevels.length;i++){if(levels[i]%20in%20available){downloadselection(available[levels[i]]);break}}}function%20downloadselection(url){var%20myframe=document.createElement('iframe');myframe.src=url;myframe.style.display='none';document.body.appendChild(myframe)}})('mp4');
Google Chrome Bookmarklet: Download YouTube Videos in Google Chrome (JavaScript Plug-in)