Bookmark and Share
Section
輕鬆自行下載youtube各種格式影片
(Publish Date: 2009-8-19 3:32am, Total Visits: 3503, Today: 1, This Week: 4, This Month: 9)

之前寫的youtube下載程式不能用了,上網查一下才發現youtube網頁又修改了,以下提供新的下載方法:
首先開啟影片(以http://www.youtube.com/watch?v=1HkXjUxWW74為例子)

進去後開啟網頁原始碼,然後按下ctrl+f收尋以下字串 (fmt_url_map),之後把後面雙引號包住的那一長串url編碼文字複製下來,這些就是下載網址了:"34%7Chttp%3A//v19.lscache3.c.youtube.com/videoplayback%3Fip%3D0.0.0.0%26sparams
%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Cburst%252Cfactor%26itag%3D34
%26ipbits%3D0%26signature%3D8188C8BADAEC68A4CC65E4C9F96966B63EF0D66F.5506C1
C3C2AF89D659A1C87FE29136FD944E65E2%26sver%3D3%26expire%3D1250690400%26key
%3Dyt1%26factor%3D1.25%26burst%3D40%26id%3Dd479178d4c565bbe%2C5%7Chttp%3
A//v11.lscache5.c.youtube.com/videoplayback%3Fip%3D0.0.0.0%26sparams%3Did%252Ce
xpire%252Cip%252Cipbits%252Citag%252Cburst%252Cfactor%26itag%3D5%26ipbits%3D0%
26signature%3D61C0EBFCE7F00A9B4DDFD1048DA05A300F1C5482.C81107182A0A79928593C
AF62E66FE5163257911%26sver%3D3%26expire%3D1250690400%26key%3Dyt1%26factor%
3D1.25%26burst%3D40%26id%3Dd479178d4c565bbe"

不過我們仍然需要處理一下這些編碼,把這些編碼全部複製到http://meyerweb.com/eric/tools/dencoder/ 然後貼上並按下decode按鈕,我們得到:

34|http://v19.lscache3.c.youtube.com/videoplayback?ip=0.0.0.0&sparams=id%2Cexpire%2Cip
%2Cipbits%2Citag%2Cburst%2Cfactor&itag=34&ipbits=0&signature=8188C8BADAEC68A4CC65E
4C9F96966B63EF0D66F.5506C1C3C2AF89D659A1C87FE29136FD944E65E2&sver=3&expire=1250
690400&key=yt1&factor=1.25&burst=40&id=d479178d4c565bbe
,5|http://v11.lscache5.c.youtube.com/videoplayback?ip=0.0.0.0&sparams=id%2Cexpire%2Cip%
2Cipbits%2Citag%2Cburst%2Cfactor&itag=5&ipbits=0&signature=61C0EBFCE7F00A9B4DDFD1048
DA05A300F1C5482.C81107182A0A79928593CAF62E66FE5163257911&sver=3&expire=1250690400
&key=yt1&factor=1.25&burst=40&id=d479178d4c565bbe

我們只需要複製紫色部份34|後面的所有網址或者,5|後面的網址就能下載了。
例如格式5的下載網址就是:http://v11.lscache5.c.youtube.com/videoplayback?ip=0.0.0.0&sparams=id%2Cexpire%2Cip%
2Cipbits%2Citag%2Cburst%2Cfactor&itag=5&ipbits=0&signature=61C0EBFCE7F00A9B4DDFD1048
DA05A300F1C5482.C81107182A0A79928593CAF62E66FE5163257911&sver=3&expire=1250690400
&key=yt1&factor=1.25&burst=40&id=d479178d4c565bbe

而34|與5|所代表的是影片格式,可參考之前寫的文章 下載觀看youtube高畫質影片

下圖是youtube各種格式數字所對應的壓縮格式,fmt_url_map有時只有格式5代表沒有高畫質版本,如果有多種版本則會使用","分開,例如,5|

 


[Total Users: 1]

I want to comment on it

1

Display: 1 - 1 of 1, Total Pages: 1

jszxy2010 : 謝謝分享,為大家帶來方便。 (2010/6) [Reply]