아래는 wireshark로 tcp 에서 긁어 본건데, 간단하게 URL을 빼내기는 힘들다라는 내용
[링크 : http://blog.scouta.com/2007/10/20/youtubes-h264-file-url/]
아래는 &t 에 &fmt 값으로 원하는 포맷으로 변경후 받는 내용
[링크 : http://blog.jimmyr.com/High_Quality_on_Youtube_11_2008.php]
하.지.만 될리가 없잖아 ㄱ-
아무튼 혼자서 또 삽질을 하면서 알아낸 것은
http://www.youtube.com/watch?v=TMZNXW7cFCs
이 녀석을 샘플로 말하자면
이 html 페이지를 열어 보면 다음과 같은 내용이 있다.
아무튼 저넘의 fmt_url_map을 들여다보자!
무언의 규칙성이 느껴지지 않는가!?
그렇다면 치환을 고고싱~
%7C 는 |
%3A 는 :
%2F 는 /
%3F 는 ?
%26 는 &
%25 는 %
%2C 는 ,
%3D 는 =
이므로 치환을 하면
의 내용이 나오게 된다.
아무튼 http:// 부터 클릭하면 다운로드를 하게 된다.
22>18 순으로 H.264를 지원하는 해상도 이므로 적절하게 다운로드!
2010/01/26 - [프로그램 사용/VLC] - VLC로 youtube 동영상 감상하기
[링크 : http://blog.scouta.com/2007/10/20/youtubes-h264-file-url/]
아래는 &t 에 &fmt 값으로 원하는 포맷으로 변경후 받는 내용
[링크 : http://blog.jimmyr.com/High_Quality_on_Youtube_11_2008.php]
하.지.만 될리가 없잖아 ㄱ-
아무튼 혼자서 또 삽질을 하면서 알아낸 것은
http://www.youtube.com/watch?v=TMZNXW7cFCs
이 녀석을 샘플로 말하자면
이 html 페이지를 열어 보면 다음과 같은 내용이 있다.
yt.setConfig({ 'VIDEO_ID': 'TMZNXW7cFCs', 'VIDEO_TITLE': '게임테크 2010 시연 동영상 1', 'SWF_URL': (yt.flash.canPlayV9Swf() ? (!yt.flash.canPlayH264Videos() ? "http://s.ytimg.com/yt/swf/watch-vfl148687.swf" : "http://s.ytimg.com/yt/swf/watch_as3-vfl148857.swf") : "http://s.ytimg.com/yt/swf/watch_v8-vfl148687.swf"), 'SWF_ARGS': {"rv.2.thumbnailUrl": "http%3A%2F%2Fi3.ytimg.com%2Fvi%2FfmPjDH1sDfo%2Fdefault.jpg", "rv.7.length_seconds": "600", "rv.0.url": "http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DPOcCzju_kqk", "rv.0.view_count": "7243", "enablecsi": "1", "rv.2.title": "%EC%97%94%EB%93%9C%EA%B2%8C%EC%9E%84+-+%EC%A7%80%EA%B5%AC+%EB%85%B8%EC%98%88%ED%99%94+%EC%B2%AD%EC%82%AC%EC%A7%84+8%2F14", "rv.7.thumbnailUrl": "http%3A%2F%2Fi3.ytimg.com%2Fvi%2F2rEfw1DEtts%2Fdefault.jpg", "rv.4.rating": "5.0", "length_seconds": "78", "rv.0.title": "%EC%97%94%EB%93%9C%EA%B2%8C%EC%9E%84+-+%EC%A7%80%EA%B5%AC+%EB%85%B8%EC%98%88%ED%99%94+%EC%B2%AD%EC%82%AC%EC%A7%84+14%2F14", "rv.7.author": "junjangsoh", "rv.7.title": "%EC%97%94%EB%93%9C%EA%B2%8C%EC%9E%84+-+%EC%A7%80%EA%B5%AC+%EB%85%B8%EC%98%88%ED%99%94+%EC%B2%AD%EC%82%AC%EC%A7%84+10%2F14", "rv.3.view_count": "6324", "allow_embed": "1", "rv.5.title": "%EC%97%94%EB%93%9C%EA%B2%8C%EC%9E%84+-+%EC%A7%80%EA%B5%AC+%EB%85%B8%EC%98%88%ED%99%94+%EC%B2%AD%EC%82%AC%EC%A7%84+5%2F14", "rv.0.length_seconds": "564", "rv.4.thumbnailUrl": "http%3A%2F%2Fi3.ytimg.com%2Fvi%2FnHQokcqw2uw%2Fdefault.jpg", "fmt_url_map": "22%7Chttp%3A%2F%2Fv20.lscache7.c.youtube.com%2Fvideoplayback%3Fip%3D0.0.0.0%26sparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Cratebypass%26fexp%3D900023%252C901802%26itag%3D22%26ipbits%3D0%26sver%3D3%26ratebypass%3Dyes%26expire%3D1267196400%26key%3Dyt1%26signature%3D0F25C849B5E0697E2708D7FDF90873CA778C1814.33DA1EEAD4CC9692C5613494A2C564133BF81595%26id%3D4cc64d5d6edc142b%2C35%7Chttp%3A%2F%2Fv21.lscache2.c.youtube.com%2Fvideoplayback%3Fip%3D0.0.0.0%26sparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D900023%252C901802%26algorithm%3Dthrottle-factor%26itag%3D35%26ipbits%3D0%26burst%3D40%26sver%3D3%26expire%3D1267196400%26key%3Dyt1%26signature%3D241955F71A0A876EC7B6DB78E3E792F66F3F21AD.309C4F50111292184108BB359CEEF7A9A86B918F%26factor%3D1.25%26id%3D4cc64d5d6edc142b%2C34%7Chttp%3A%2F%2Fv2.lscache8.c.youtube.com%2Fvideoplayback%3Fip%3D0.0.0.0%26sparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D900023%252C901802%26algorithm%3Dthrottle-factor%26itag%3D34%26ipbits%3D0%26burst%3D40%26sver%3D3%26expire%3D1267196400%26key%3Dyt1%26signature%3D6AE4B5BA71E0F02396287FFDA1DF821A6158B6AF.CB0891E42ADAB8317ECA61A64CF77DD79BE662AC%26factor%3D1.25%26id%3D4cc64d5d6edc142b%2C5%7Chttp%3A%2F%2Fv7.lscache3.c.youtube.com%2Fvideoplayback%3Fip%3D0.0.0.0%26sparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D900023%252C901802%26algorithm%3Dthrottle-factor%26itag%3D5%26ipbits%3D0%26burst%3D40%26sver%3D3%26expire%3D1267196400%26key%3Dyt1%26signature%3D5AD304AB9BCC13F8BD46205F6F5FD95EF491C5EB.AB6CB2D6EEAE16BAE8003D88D2628D4008065739%26factor%3D1.25%26id%3D4cc64d5d6edc142b", "rv.2.rating": "5.0", "csi_page_type": "watch", "keywords": "14", "cr": "KR", "rv.1.url": "http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DLUs4UPyE2AI", "rv.6.thumbnailUrl": "http%3A%2F%2Fi4.ytimg.com%2Fvi%2FCjn_lrc2b_k%2Fdefault.jpg", "rv.1.id": "LUs4UPyE2AI", "rv.3.rating": "5.0", "rv.6.title": "%EC%97%94%EB%93%9C%EA%B2%8C%EC%9E%84+-+%EC%A7%80%EA%B5%AC+%EB%85%B8%EC%98%88%ED%99%94+%EC%B2%AD%EC%82%AC%EC%A7%84+13%2F14", "fmt_list": "22%2F2000000%2F9%2F0%2F115%2C35%2F640000%2F9%2F0%2F115%2C34%2F0%2F9%2F0%2F115%2C5%2F0%2F7%2F0%2F0", "rv.7.id": "2rEfw1DEtts", "rv.1.title": "%EC%97%94%EB%93%9C%EA%B2%8C%EC%9E%84+-+%EC%A7%80%EA%B5%AC+%EB%85%B8%EC%98%88%ED%99%94+%EC%B2%AD%EC%82%AC%EC%A7%84+1%2F14", "rv.1.thumbnailUrl": "http%3A%2F%2Fi1.ytimg.com%2Fvi%2FLUs4UPyE2AI%2Fdefault.jpg", "rv.6.length_seconds": "602", "rv.0.rating": "5.0", "watermark": "http%3A%2F%2Fs.ytimg.com%2Fyt%2Fswf%2Flogo-vfl106645.swf%2Chttp%3A%2F%2Fs.ytimg.com%2Fyt%2Fswf%2Fhdlogo-vfl100714.swf", "rv.6.author": "junjangsoh", "rv.5.id": "gfsJ3Eq_Zhs", "rv.4.author": "junjangsoh", "plid": "AASAfHyi-5gDThaQ", "rv.0.id": "POcCzju_kqk", "rv.3.length_seconds": "598", "rv.5.rating": "5.0", "rv.4.url": "http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DnHQokcqw2uw", "sdetail": "p%3A%2Fvideos", "fexp": "900023%2C901802", "rv.1.author": "junjangsoh", "rv.1.rating": "5.0", "rv.4.title": "%EC%97%94%EB%93%9C%EA%B2%8C%EC%9E%84+-+%EC%A7%80%EA%B5%AC+%EB%85%B8%EC%98%88%ED%99%94+%EC%B2%AD%EC%82%AC%EC%A7%84+3%2F14", "rv.5.thumbnailUrl": "http%3A%2F%2Fi4.ytimg.com%2Fvi%2FgfsJ3Eq_Zhs%2Fdefault.jpg", "rv.5.url": "http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DgfsJ3Eq_Zhs", "rv.3.title": "%EC%97%94%EB%93%9C%EA%B2%8C%EC%9E%84+-+%EC%A7%80%EA%B5%AC+%EB%85%B8%EC%98%88%ED%99%94+%EC%B2%AD%EC%82%AC%EC%A7%84+4%2F14", "sourceid": "y", "rv.0.author": "junjangsoh", "rv.3.thumbnailUrl": "http%3A%2F%2Fi2.ytimg.com%2Fvi%2Fi27PAb-w0AY%2Fdefault.jpg", "rv.2.author": "junjangsoh", "rv.6.url": "http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DCjn_lrc2b_k", "rv.7.rating": "5.0", "rv.3.url": "http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Di27PAb-w0AY", "fmt_map": "22%2F2000000%2F9%2F0%2F115%2C35%2F640000%2F9%2F0%2F115%2C34%2F0%2F9%2F0%2F115%2C5%2F0%2F7%2F0%2F0", "hl": "en_US", "rv.7.url": "http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D2rEfw1DEtts", "rv.2.view_count": "5454", "rv.4.length_seconds": "611", "rv.4.view_count": "7731", "rv.2.url": "http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DfmPjDH1sDfo", "rv.5.length_seconds": "600", "rv.0.thumbnailUrl": "http%3A%2F%2Fi1.ytimg.com%2Fvi%2FPOcCzju_kqk%2Fdefault.jpg", "fmt_stream_map": "22%7Chttp%3A%2F%2Fv20.lscache7.c.youtube.com%2Fvideoplayback%3Fip%3D0.0.0.0%26sparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Cratebypass%26fexp%3D900023%252C901802%26itag%3D22%26ipbits%3D0%26sver%3D3%26ratebypass%3Dyes%26expire%3D1267196400%26key%3Dyt1%26signature%3D0F25C849B5E0697E2708D7FDF90873CA778C1814.33DA1EEAD4CC9692C5613494A2C564133BF81595%26id%3D4cc64d5d6edc142b%2C35%7Chttp%3A%2F%2Fv21.lscache2.c.youtube.com%2Fvideoplayback%3Fip%3D0.0.0.0%26sparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D900023%252C901802%26algorithm%3Dthrottle-factor%26itag%3D35%26ipbits%3D0%26burst%3D40%26sver%3D3%26expire%3D1267196400%26key%3Dyt1%26signature%3D241955F71A0A876EC7B6DB78E3E792F66F3F21AD.309C4F50111292184108BB359CEEF7A9A86B918F%26factor%3D1.25%26id%3D4cc64d5d6edc142b%2C34%7Chttp%3A%2F%2Fv2.lscache8.c.youtube.com%2Fvideoplayback%3Fip%3D0.0.0.0%26sparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D900023%252C901802%26algorithm%3Dthrottle-factor%26itag%3D34%26ipbits%3D0%26burst%3D40%26sver%3D3%26expire%3D1267196400%26key%3Dyt1%26signature%3D6AE4B5BA71E0F02396287FFDA1DF821A6158B6AF.CB0891E42ADAB8317ECA61A64CF77DD79BE662AC%26factor%3D1.25%26id%3D4cc64d5d6edc142b%2C5%7Chttp%3A%2F%2Fv7.lscache3.c.youtube.com%2Fvideoplayback%3Fip%3D0.0.0.0%26sparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D900023%252C901802%26algorithm%3Dthrottle-factor%26itag%3D5%26ipbits%3D0%26burst%3D40%26sver%3D3%26expire%3D1267196400%26key%3Dyt1%26signature%3D5AD304AB9BCC13F8BD46205F6F5FD95EF491C5EB.AB6CB2D6EEAE16BAE8003D88D2628D4008065739%26factor%3D1.25%26id%3D4cc64d5d6edc142b", "sk": "AN-IBdoG6rDwqBQ2JAmJ7AiKj79qzYtCC", "rv.1.view_count": "25631", "rv.1.length_seconds": "596", "rv.6.rating": "5.0", "rv.5.author": "junjangsoh", "vq": "medium", "rv.3.id": "i27PAb-w0AY", "rv.2.id": "fmPjDH1sDfo", "rv.2.length_seconds": "600", "rv.5.view_count": "6470", "t": "vjVQa1PpcFNMsS2pAI26JfksbOObe4nVZu_ORw-B1v4%3D", "rv.6.id": "Cjn_lrc2b_k", "video_id": "TMZNXW7cFCs", "rv.6.view_count": "5377", "rv.3.author": "junjangsoh", "rv.4.id": "nHQokcqw2uw", "rv.7.view_count": "4854"}, 'SWF_GAM_URL': null, 'SWF_DC_URL': null, 'SWF_EXPRESS_URL': null, 'SWF_AD_EURL': null, 'SWF_IS_PLAYING_ALL': false, 'SWF_SET_WMODE': false, 'SHOW_AUTOSHARE': true, 'IS_WIDESCREEN': false, 'IS_HD_AVAILABLE': true, 'WIDE_PLAYER_STYLES': ["watch-wide-mode"] , 'EMBED_URL': 'http://www.youtube.com/v/TMZNXW7cFCs&hl=en_US&fs=1', 'VIDEO_LANGUAGE': 'EN', 'VIDEO_USERNAME': 'say2420', 'PLAY_NEXT_FROM': '', 'PLAY_NEXT_COUNT': '0', 'QL_AUTOSCROLL_DEST': 0, 'LOCALE': 'en_US', 'AXC': '', 'SUBSCRIBE_AXC': '', 'PLAYER_SAVE_QUALITY': true, 'COMMENTS_THRESHHOLD': -5, 'COMMENTS_FILTER': 0, 'COMMENTS_PAGE_SIZE': 10, 'COMMENTS_MAX_PAGE': 1, 'COMMENTS_COUNT': 4, 'IS_BRANDED_WATCH': false }); |
아무튼 저넘의 fmt_url_map을 들여다보자!
"22%7Chttp%3A%2F%2Fv20.lscache7.c.youtube.com%2Fvideoplayback%3Fip%3D0.0.0.0%26sparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Cratebypass%26fexp%3D900023%252C901802%26itag%3D22%26ipbits%3D0%26sver%3D3%26ratebypass%3Dyes%26expire%3D1267196400%26key%3Dyt1%26signature%3D0F25C849B5E0697E2708D7FDF90873CA778C1814.33DA1EEAD4CC9692C5613494A2C564133BF81595%26id%3D4cc64d5d6edc142b%2C35%7Chttp%3A%2F%2Fv21.lscache2.c.youtube.com%2Fvideoplayback%3Fip%3D0.0.0.0%26sparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D900023%252C901802%26algorithm%3Dthrottle-factor%26itag%3D35%26ipbits%3D0%26burst%3D40%26sver%3D3%26expire%3D1267196400%26key%3Dyt1%26signature%3D241955F71A0A876EC7B6DB78E3E792F66F3F21AD.309C4F50111292184108BB359CEEF7A9A86B918F%26factor%3D1.25%26id%3D4cc64d5d6edc142b%2C34%7Chttp%3A%2F%2Fv2.lscache8.c.youtube.com%2Fvideoplayback%3Fip%3D0.0.0.0%26sparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D900023%252C901802%26algorithm%3Dthrottle-factor%26itag%3D34%26ipbits%3D0%26burst%3D40%26sver%3D3%26expire%3D1267196400%26key%3Dyt1%26signature%3D6AE4B5BA71E0F02396287FFDA1DF821A6158B6AF.CB0891E42ADAB8317ECA61A64CF77DD79BE662AC%26factor%3D1.25%26id%3D4cc64d5d6edc142b%2C5%7Chttp%3A%2F%2Fv7.lscache3.c.youtube.com%2Fvideoplayback%3Fip%3D0.0.0.0%26sparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D900023%252C901802%26algorithm%3Dthrottle-factor%26itag%3D5%26ipbits%3D0%26burst%3D40%26sver%3D3%26expire%3D1267196400%26key%3Dyt1%26signature%3D5AD304AB9BCC13F8BD46205F6F5FD95EF491C5EB.AB6CB2D6EEAE16BAE8003D88D2628D4008065739%26factor%3D1.25%26id%3D4cc64d5d6edc142b" |
무언의 규칙성이 느껴지지 않는가!?
그렇다면 치환을 고고싱~
%7C 는 |
%3A 는 :
%2F 는 /
%3F 는 ?
%26 는 &
%25 는 %
%2C 는 ,
%3D 는 =
이므로 치환을 하면
의 내용이 나오게 된다.
아무튼 http:// 부터 클릭하면 다운로드를 하게 된다.
22>18 순으로 H.264를 지원하는 해상도 이므로 적절하게 다운로드!
2010/01/26 - [프로그램 사용/VLC] - VLC로 youtube 동영상 감상하기
'프로그램 사용 > 유튜브(youtube)' 카테고리의 다른 글
youtube xml / RSS 주소 (0) | 2010.04.09 |
---|---|
youTube 경로로 VLC 플레이가 안됨 (0) | 2010.04.01 |
유튜브 썸네일 사이즈(image size of thumbnail on youtube) (4) | 2010.03.16 |
3D 유튜브 (6) | 2010.03.15 |
URL encode (2) | 2010.03.02 |