有在幹資料的人都會推的開源:youtube-dl
優點是去爬網頁的資料,不需使用 api key也可以使用,
也有支援oauth的功魴。
測試指令
-F 列出所有影片格式
youtube-dl https://www.youtube.com/watch?v=QKm-SOOMC4c -F
-f <格式字串|itag id > -g 列出指定的影片格式 (同事測試六小時會過期)
youtube-dl https://www.youtube.com/watch?v=QKm-SOOMC4c -f best,bestvideo ,bestaudio -g
可以取得指定的播放網址
影音混合的格式
22 mp4 1280x720 hd720 1853k , avc1.64001F, mp4a.40.2@192k (44100Hz) (best)缺音源
266 mp4 3840x2000 2160s 21499k , avc1.640033, 30fps, video only, 416.39MiB
https://r2---sn-n58xjvh-u2xe.googlevideo.com/videoplayback?key=yt6&txp=5511222&mime=audio%2Fwebm&c=WEB&mn=sn-n58xjvh-u2xe%2Csn-u4o-u2xy&mm=31%2C29&ip=61.63.156.155&pl=21&itag=251&gir=yes&signature=9A50E784043546435F3B3625985157B6475F3E7E.CC62E740825F34B40CC00ABA1B778D372A2D43F2&id=o-APaLtk67hTCCfREk5CFTQJGEGRXRjMtLadjctgdjpFqr&mv=m&keepalive=yes&ms=au%2Crdu&lmt=1547892083268195&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&ipbits=0&requiressl=yes&initcwndbps=600000&source=youtube&ei=UtqhXPCNFNXU4QL4tIbQCg&expire=1554132658&clen=3956896&mt=1554110979&dur=260.081&fvip=3&ratebypass=yes
https://github.com/przemyslawpluta/node-youtube-dl
https://jsoneditoronline.org/?id=7d62c1c752144c60b6e3d2333ab79305
https://jsoneditoronline.org/?id=45617ee426d2454d9b3c4383fb0b4558
https://tyrrrz.me/Blog/Reverse-engineering-YouTube
https://jsoneditoronline.org/?id=7d62c1c752144c60b6e3d2333ab79305
https://jsoneditoronline.org/?id=45617ee426d2454d9b3c4383fb0b4558
https://tyrrrz.me/Blog/Reverse-engineering-YouTube
沒有留言:
張貼留言
留個話吧:)