azihassan / youtube-d

A fast command-line Youtube downloader
MIT License
7 stars 0 forks source link

Regular formats are rate limited again #79

Closed azihassan closed 4 months ago

azihassan commented 4 months ago

I ran into a video that gets rate limited despite seemingly solving the N challenge.

youtube-d https://www.youtube.com/watch\?v\=uNm2ZZhf0zQ --output-url --verbose
Verbose mode : true
Handling https://www.youtube.com/watch?v=uNm2ZZhf0zQ
Cache hit (/tmp/uNm2ZZhf0zQ.html), skipping HTML download...
base.js cache hit (/tmp/65e3708e.js), skipping download...
Downloaded video HTML
Attempt to dethrottle : Yes
I Lost my job so I flipped stuff online: Month 5 Part 2
I Lost my job so I flipped stuff online Month 5 Part 2-uNm2ZZhf0zQ-18.mp4
/media/hassan/BLACKBERRY/Videos/I Lost my job so I flipped stuff online Month 5 Part 2-uNm2ZZhf0zQ-18.mp4
Found n : GhHMiXTYgC6J1UrMNvE
challenge name : mma
Solved n : ZwBKWcTgCqxn3g
uNm2ZZhf0zQ.html
Found link : https://rr3---sn-f5o5-jho6.googlevideo.com/videoplayback?expire=1721194384&ei=MAOXZpC9BdvRp-oPla61-AM&ip=105.66.5.48&id=o-AKgAy3ATRhAFhQQfE2dOlUDKuUh0xJ2E-5AeuJkhuidk&itag=18&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&mh=Ne&mm=31%2C29&mn=sn-f5o5-jho6%2Csn-h5q7knes&ms=au%2Crdu&mv=m&mvi=3&pl=24&initcwndbps=260000&bui=AXc671JQtgTEXXNfDJ6KXMR0M6cvzClzEIXrFgkzPH92RbpvdCeqBXFjH82oyTBNfr5Iz9Goxjgl-6hk&spc=NO7bAZfpkDMAPrEqY749D9uxCR4z4Cadpnx2tn25_269pUFHJDA-ueF-_jrv&vprv=1&svpuc=1&mime=video%2Fmp4&ns=OVgTalUTOpkt52mwzmXd1qgQ&rqh=1&gir=yes&clen=58319797&ratebypass=yes&dur=906.333&lmt=1721156585580006&mt=1721172556&fvip=3&c=WEB&sefc=1&txp=3309224&n=ZwBKWcTgCqxn3g&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cbui%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cratebypass%2Cdur%2Clmt&sig=AJfQdSswRAIgXYZllb5gT3Xj6jrHYg_c9V9qKX92y14y7KAWh_fowjUCIHrRHWfl5eWIfiFrQUee79hc0noiqB_gqqn8o2jT5YAL&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AHlkHjAwRQIgNS4okl7PmoNqIo70pNwG6vpHJJmyKAEf3NoXUIxkqCwCIQDHKKOSnBDxdqAHtudtCE9RtTZuzJ23E1xV-2HE4uYz-g%3D%3D
https://rr3---sn-f5o5-jho6.googlevideo.com/videoplayback?expire=1721194384&ei=MAOXZpC9BdvRp-oPla61-AM&ip=105.66.5.48&id=o-AKgAy3ATRhAFhQQfE2dOlUDKuUh0xJ2E-5AeuJkhuidk&itag=18&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&mh=Ne&mm=31%2C29&mn=sn-f5o5-jho6%2Csn-h5q7knes&ms=au%2Crdu&mv=m&mvi=3&pl=24&initcwndbps=260000&bui=AXc671JQtgTEXXNfDJ6KXMR0M6cvzClzEIXrFgkzPH92RbpvdCeqBXFjH82oyTBNfr5Iz9Goxjgl-6hk&spc=NO7bAZfpkDMAPrEqY749D9uxCR4z4Cadpnx2tn25_269pUFHJDA-ueF-_jrv&vprv=1&svpuc=1&mime=video%2Fmp4&ns=OVgTalUTOpkt52mwzmXd1qgQ&rqh=1&gir=yes&clen=58319797&ratebypass=yes&dur=906.333&lmt=1721156585580006&mt=1721172556&fvip=3&c=WEB&sefc=1&txp=3309224&n=ZwBKWcTgCqxn3g&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cbui%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cratebypass%2Cdur%2Clmt&sig=AJfQdSswRAIgXYZllb5gT3Xj6jrHYg_c9V9qKX92y14y7KAWh_fowjUCIHrRHWfl5eWIfiFrQUee79hc0noiqB_gqqn8o2jT5YAL&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AHlkHjAwRQIgNS4okl7PmoNqIo70pNwG6vpHJJmyKAEf3NoXUIxkqCwCIQDHKKOSnBDxdqAHtudtCE9RtTZuzJ23E1xV-2HE4uYz-g%3D%3D
azihassan commented 4 months ago

The challenge name gets detected correctly, but the the function that parses its implementation expects it to end with return b.join("")};. The /tmp/65e3708e.js file, however, has an implementation that ends with return Array.prototype.join.call(b,"")}; :

image

azihassan commented 4 months ago

Even though the parsing function doesn't stop until it encounters a return b.join("")};, the resulting challenge solution is still correct :

image

azihassan commented 4 months ago

I ran the youtube-d command again and it's no longer rate limited, which was strange :

youtube-d https://www.youtube.com/watch\?v\=uNm2ZZhf0zQ                       
Verbose mode : false
Handling https://www.youtube.com/watch?v=uNm2ZZhf0zQ
Cache hit (/tmp/uNm2ZZhf0zQ.html), skipping HTML download...
base.js cache hit (/tmp/65e3708e.js), skipping download...
I Lost my job so I flipped stuff online: Month 5 Part 2
Downloading https://www.youtube.com/watch?v=uNm2ZZhf0zQ to I Lost my job so I flipped stuff online Month 5 Part 2-uNm2ZZhf0zQ-18.mp4
Using RegularDownloader
Resuming from byte 5136384
[99.98 %] 50.71 / 50.72 MB
Done !

It used the same cached resources and therefore the same URL as before. I'll close this as a fluke until I ran into it again.