-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Youtube] Got server error HTTP Error 403: Forbidden(latest master version) #32905
Comments
Indeed this seems to be a pathological video where almost all video formats fail on the first fragment and 299 may fail later, regardless of Python 2.7/3.5/3.9 and User-Agent settings. yt-dlp 2024.08.06 still works, apparently. It has fancy networking that we can't easily replicate: maybe punt to curl for all requests? |
I have that with every single video I try. Curiously enough format '18' work all the time. Other formats that work are '136', '137', '248' and/or '160', but it depends on video - not always the case. Still, format '18' is the most reliable to work. |
So
|
Can confirm that a lot of the video-only formats are just being 403-ed in the middle with their downloads, resulting in me getting files that stop after about 10-20 minutes into the video, but still have full sized audio. By now I have written something into my scripts to just pick format 18 as long as a flag is set, because i foresee this issue happening again in the future once it is eventually fixed... >.> |
So has anyone tried fetching fragments in fragments of <1MB? We already had a work-around to download in fragments to avoid throttling IIRC. Otherwise:
|
Apparently the latest fix worked for not even a day, that doesn't bode well. Personally I keep getting "giving up after 0 fragment retries" in my python stuff. From what I read in yesterdays thread, it seems like this will just not work out with fake JS interpretation if they try to combat this in the slightest. Like, that almost doesn't deserve the name attack vector, that's an attack landscape. |
This change is significant. I checked old, pre quantum Firefox and videos don't work any more, when 3 days ago they did. |
Maybe the new player JS uses some G JS syntax extension (aka ECMA2021+) that hadn't been contemplated in those FF versions. Is there an error in the JS console? |
It used to work as embedded or as mobile (when used mobile user agent). Now all of them display all saying error:
Loading any video at https://www.youtube.com/embed/1234567890a:
Then pressing play:
ED. If it's of any help, despite what was said before, there are some videos that work. First - this one doesn't, and gives following console log
This one does and, with this log:
So, after clicking 'play' it gives this error: |
No matter what chunk size I use I'm seeing hard 403 errors at 1Meg as others have reported - I'm able to download as many fragments as I want up to 1Meg and then get a 403. Have experimented with generating It feels like they've added a check somewhere which fails at the 1Meg mark but I haven't found anything yet where that might be. Checking via the browser I can see that youtube is happily downloading |
But in the browser the media links have the In line with step 1 above, I'm gradually pulling stuff from the yt-dlp extractor, enough to download HLS with client |
I'm not seeing a Edit: Looks like the playbackCookie / POST data is extracted from the bytes of the previous fragment response somehow |
This is the procedure that I am using in my own code. Load https://www.youtube.com/embed/<id#> and find the base.js link. Do the usual to extract the sig and n-sig. Extract the signatureTimestamp for the next step. Load https://www.youtube.com/youtubei/v1/player with the signatureTimestamp and TVHTML5_SIMPLY_EMBEDDED_PLAYER as the client name. If the JSON response contains "formats" and/or "adaptiveFormats" then we're good. This covers most videos, including age-gated ones. The 403 problem occurs when we have go to the next step. We can't use "www.youtube.com". We must use "m.youtube.com" with the user agent set to something like "Mozilla/5.0 (Android 14)" which is what I'm using. Load https://m.youtube.com/watch?v=<id#> and extract the JSON structures that you would otherwise have gotten from the previous step. And that's it. The extra step is only required for videos that disallow embedding. |
Please don't bother to supply any "me too" reports unless the log shows some novelty that may help with rectification. Just "Like", or whatever, an existing similar report. You can see how a @8chanAnon's algorithm is what is currently done for age-gate videos, up to the last step with Step 2 will only work if |
Indeed, Android 14/FF 122 at m.youtube.com didn't list the |
I don't think it's worth trying to get around the poToken, it will eventually be required in all clients. I keep digging into There's a |
This comment was marked as outdated.
This comment was marked as outdated.
On a lot of websites I want to download from youtube-dl and curl dont even get the correct html, Instead I have a bash-script that predownloads the non-captcha html via "https://github.com/lwthiker/curl-impersonate" (runs in docker container , i use tag: 0.5.2-ff-alpine) AFAIK lwthiker/curl-impersonate is the only http client that completly impersonates an actual browser like firefox. |
Yes, but so far as captcha is generally understood (G/recaptcha, hacaptcha, Cloudflare challenge aka breaks the Web), that is not the problem. Even if it solved the |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Testing shows that the DASH formats from the mobile web client are failing, regardless of their origin. The same formats extracted by yt-dlp stable are OK, in a test setup using ffmpeg as downloader in each case. The test code is #32987 adapted to use the
|
Apparently the client parameters, including UA, need to be just right. A temporary fix (that worked today)is included in PR #32987. |
Please try https://github.com/ytdl-org/ytdl-nightly/releases/tag/2024.12.17 to resolve this issue for now. |
Wow it works! 24.12.17 but for how long? Thanks dirkf ! You have go fundme or something lol |
LoL, but if you want, pay back to an open source program in some way, or somehow help a local charity. Also, review #32960 for guidance on how to avoid further breakage. |
This comment was marked as duplicate.
This comment was marked as duplicate.
Per #33018, this issue is now recurring, with various player JS, though not with format 18, essentially back to the state at #32905 (comment): $ python3.9 -m youtube_dl -v -f 137 'https://www.youtube.com/watch?v=MqyZfibp07o'[debug] System config: ['--prefer-ffmpeg']
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '-f', '137', 'https://www.youtube.com/watch?v=MqyZfibp07o']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Git HEAD: 1036478d1
[debug] Python 3.9.21 (CPython i686 32bit) - Linux-4.4.0-210-generic-i686-with-glibc2.23 - OpenSSL 1.1.1w 11 Sep 2023 - glibc 2.23
[debug] exe versions: avconv 4.3, avprobe 4.3, ffmpeg 4.3, ffprobe 4.3
[debug] Proxy map: {}
[youtube] MqyZfibp07o: Downloading webpage
[youtube] MqyZfibp07o: Downloading API JSON
[debug] [youtube] Decrypted nsig FhrJPUatObxYK8Rv => vdEPuvWCK9YF7
[debug] [youtube] Decrypted nsig c39LBljb5RB6QKSg => 9Ngcwo0LzFTVx
[debug] Invoking downloader on 'https://rr4---sn-cu-aigss.googlevideo.com/videoplayback?expire=1736460690&ei=MvV_Z9njHcTFhcIPzsXIsQw&ip=46.208.6.43&id=o-AFICHuugxW07duGeQhcxyRFyZ8mExMCkVUQadrcnyrjz&itag=137&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278%2C597%2C598&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&met=1736439090%2C&mh=ny&mm=31%2C29&mn=sn-cu-aigss%2Csn-cu-c9i6&ms=au%2Crdu&mv=m&mvi=4&pl=25&rms=au%2Cau&initcwndbps=3481250&bui=AfMhrI9IQbFD09jugoDiezFLtv_vSU-mL0lAjWrfqVHOywfv81wS-0OxKD6pCCgba8F0W_onQJ20KvMJ&spc=x-caUF4NRFvEg-sb&vprv=1&svpuc=1&mime=video%2Fmp4&ns=cO0N5BklTE7VjbUNkW2xKf0Q&rqh=1&gir=yes&clen=555866737&dur=3068.166&lmt=1736417214465510&mt=1736438723&fvip=5&keepalive=yes&fexp=51326932%2C51331020%2C51335594%2C51353497%2C51371294&c=MWEB&sefc=1&txp=5535034&n=9Ngcwo0LzFTVx&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cxpc%2Cbui%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&sig=AJfQdSswRQIhAKi5iQ8xYUUR5r_OKM3PHUfJmG91sVFYRqIL1pvqWA51AiAvh6XGoyHECgOQgl7HTcLFvU_I74ZaLaCRLJSDsBxToA%3D%3D&lsparams=met%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Crms%2Cinitcwndbps&lsig=AGluJ3MwRgIhAJP8BFRZ57OaIxXWHdfXqyHXhkSR7N-OWog_f8nuaHfjAiEAnQ0SdqHYBZ1jhitSo_u5CyNuEvumDEx7wSHTHhqadqE%3D'
[dashsegments] Total fragments: 54
[download] Destination: ถ่ายทอดสด รายการข่าว 3 มิติ วันที่ 8 มกราคม 2568-MqyZfibp07o.mp4
[download] Got server HTTP error: HTTP Error 403: Forbidden. Retrying fragment 1 (attempt 1 of 10)...
...
[download] Got server HTTP error: HTTP Error 403: Forbidden. Retrying fragment 1 (attempt 10 of 10)...
ERROR: giving up after 10 fragment retries
File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/df/Documents/src/youtube-dl/youtube_dl/__main__.py", line 19, in <module>
youtube_dl.main()
File "/home/df/Documents/src/youtube-dl/youtube_dl/__init__.py", line 477, in main
_real_main(argv)
File "/home/df/Documents/src/youtube-dl/youtube_dl/__init__.py", line 467, in _real_main
retcode = ydl.download(all_urls)
File "/home/df/Documents/src/youtube-dl/youtube_dl/YoutubeDL.py", line 2222, in download
res = self.extract_info(
File "/home/df/Documents/src/youtube-dl/youtube_dl/YoutubeDL.py", line 881, in extract_info
return self.__extract_info(url, ie, download, extra_info, process)
File "/home/df/Documents/src/youtube-dl/youtube_dl/YoutubeDL.py", line 888, in wrapper
return func(self, *args, **kwargs)
File "/home/df/Documents/src/youtube-dl/youtube_dl/YoutubeDL.py", line 995, in __extract_info
return self.process_ie_result(ie_result, download, extra_info)
File "/home/df/Documents/src/youtube-dl/youtube_dl/YoutubeDL.py", line 1029, in process_ie_result
return self.process_video_result(ie_result, download=download)
File "/home/df/Documents/src/youtube-dl/youtube_dl/YoutubeDL.py", line 1884, in process_video_result
self.process_info(new_info)
File "/home/df/Documents/src/youtube-dl/youtube_dl/YoutubeDL.py", line 140, in wrapper
return func(self, *args, **kwargs)
File "/home/df/Documents/src/youtube-dl/youtube_dl/YoutubeDL.py", line 2127, in process_info
success = dl(filename, info_dict)
File "/home/df/Documents/src/youtube-dl/youtube_dl/YoutubeDL.py", line 2057, in dl
return fd.download(name, new_info)
File "/home/df/Documents/src/youtube-dl/youtube_dl/downloader/common.py", line 380, in download
return self.real_download(filename, info_dict)
File "/home/df/Documents/src/youtube-dl/youtube_dl/downloader/dash.py", line 78, in real_download
self.report_error('giving up after %s fragment retries' % count)
File "/home/df/Documents/src/youtube-dl/youtube_dl/downloader/common.py", line 175, in report_error
self.ydl.report_error(*args, **kargs)
File "/home/df/Documents/src/youtube-dl/youtube_dl/YoutubeDL.py", line 691, in report_error
self.trouble(*args, **kwargs)
File "/home/df/Documents/src/youtube-dl/youtube_dl/YoutubeDL.py", line 639, in trouble
tb_data = traceback.format_list(traceback.extract_stack())
$ The equivalent yt-dlp command succeeds: $ yt-dlp -v -f 137 --extractor-args 'youtube:player-client=mweb' 'https://www.youtube.com/watch?v=MqyZfibp07o'
[debug] Command-line config: ['-v', '-f', '137', '--extractor-args', 'youtube:player-client=mweb', 'https://www.youtube.com/watch?v=MqyZfibp07o']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2024.12.06 from yt-dlp/yt-dlp [4bd265539] (zip)
[debug] Python 3.9.21 (CPython i686 32bit) - Linux-4.4.0-210-generic-i686-with-glibc2.23 (OpenSSL 1.1.1w 11 Sep 2023, glibc 2.23)
[debug] exe versions: ffmpeg 4.3, ffprobe 4.3
[debug] Optional libraries: Cryptodome-3.11.0, certifi-2019.11.28, requests-2.25.1, secretstorage-3.2.0, sqlite3-3.37.2, urllib3-1.25.11
[debug] Proxy map: {}
[debug] Request Handlers: urllib
[debug] Loaded 1837 extractors
[youtube] Extracting URL: https://www.youtube.com/watch?v=MqyZfibp07o
[youtube] MqyZfibp07o: Downloading webpage
[youtube] MqyZfibp07o: Downloading mweb player API JSON
[debug] Loading youtube-nsig.a5032d18 from cache
[debug] [youtube] Decrypted nsig FLm4oyWALZ46GGWf => sm12-JHmSOKnww
[debug] Loading youtube-nsig.a5032d18 from cache
[debug] [youtube] Decrypted nsig 3R_Ff_X45cd7bE5y => 188bfpfqz_aIgg
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec, channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
[info] MqyZfibp07o: Downloading 1 format(s): 137
[debug] Invoking http downloader on "https://rr4---sn-cu-aigss.googlevideo.com/videoplayback?expire=1736453314&ei=Yth_Z8ibKc3Dp-oPrpjIsQE&ip=46.208.6.43&id=o-AAk-qJPdjArNz09BZUyPwIVH2OV5AUQXRvtmPEGDbcT8&itag=137&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278%2C597%2C598&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&met=1736431714%2C&mh=ny&mm=31%2C29&mn=sn-cu-aigss%2Csn-cu-c9i6&ms=au%2Crdu&mv=m&mvi=4&pl=25&rms=au%2Cau&initcwndbps=3366250&bui=AfMhrI9FckGzGU41FgTLKXZ866Ic4oCOGDWkG_tJiOUiLy4jwi2nZBKZxSWmGBd63LIfot2ZP5foBy0S&vprv=1&svpuc=1&mime=video%2Fmp4&ns=QHtbYg03vielmQj_-egUGdEQ&rqh=1&gir=yes&clen=555866737&dur=3068.166&lmt=1736417214465510&mt=1736431267&fvip=5&keepalive=yes&fexp=51326932%2C51331020%2C51335594%2C51353498%2C51371294&c=MWEB&sefc=1&txp=5535034&n=188bfpfqz_aIgg&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cxpc%2Cbui%2Cvprv%2Csvpuc%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&sig=AJfQdSswRQIhAJxN7dsZuBmVvv0bCA17XlbR63MOTtMOK943D6G9OlJhAiAeKfv0GE8uHWc4rycSn-mGWciW8MtlYfRIxY0kEyyuFg%3D%3D&lsparams=met%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Crms%2Cinitcwndbps&lsig=AGluJ3MwRAIgE9AVtKI4ie5fKX9qjw2LS8ca7vx8xjSfrA_2QFe3whQCIBzY6qLORyCiOQ2JGtoWiTEhlNI854gY7RfDk-e_Yuen"
[download] Destination: ถ่ายทอดสด รายการข่าว 3 มิติ วันที่ 8 มกราคม 2568 [MqyZfibp07o].mp4
[download] 1.2% of 530.12MiB at 1008.60KiB/s ETA 08:51^C
ERROR: Interrupted by user
$ Although the client parameters are the same, the download links have different query parameters, ignoring time, nonce and sig values: yt-dlp get a |
And now it's not, for the last 4 hours or so. Please report if you are getting 403 on download with the 2025.01 nightly releases and not using a VPN, data centre IP address, or otherwise provoking the site to block you. |
Seems to be working again for now (own build from master): youtube-dl -v https://www.youtube.com/watch?v=_ih1Ofn8k1s
[debug] System config: []
[debug] User config: ['--rm-cache-dir', '-i', '-o', '/dev/shm/test-ytd/%(title)s.%(ext)s', '-f', 'bestvideo[height<=1080][ext=mp4][vcodec^=avc]+bestaudio[ext=m4a]/best[ext=mp4]/best', '--no-mtime', '--embed-thumbnail', '--force-ipv4']
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://www.youtube.com/watch?v=_ih1Ofn8k1s']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2025.01.06
[debug] Lazy loading extractors enabled
[debug] Single file build
[debug] Python 3.10.12 (CPython x86_64 64bit) - Linux-5.15.0-130-generic-x86_64-with-glibc2.35 - OpenSSL 3.0.2 15 Mar 2022 - glibc 2.35
[debug] exe versions: ffmpeg N-118242-gf80af3657f-20250105, ffprobe N-118242-gf80af3657f-20250105, rtmpdump 2.4
[debug] Proxy map: {}
Removing cache dir /home/nico/.cache/youtube-dl ...
[youtube] _ih1Ofn8k1s: Downloading webpage
[youtube] _ih1Ofn8k1s: Downloading API JSON
[youtube] _ih1Ofn8k1s: Downloading player 3ede36f2
[debug] [youtube] Decrypted nsig o4Qsvp5P9kLeX7hW2Q => sc7stUJPArCgpg
[debug] [youtube] Decrypted nsig WkAsFGr-zImqSOd3Tm => C2yQtDm1cQ0WvQ
[youtube] _ih1Ofn8k1s: Downloading thumbnail ...
[youtube] _ih1Ofn8k1s: Writing thumbnail to: /dev/shm/test-ytd/Experimental Evidence of Photons Experiencing Negative Time.jpg
[debug] Invoking downloader on 'https://rr1---sn-5hne6nzd.googlevideo.com/videoplayback?expire=1736512737&ei=gcCAZ_bxHLiPi9oPndXN0Qs&ip=<REDACTED>&id=o-AJTxm_nJRVp8Pz8dCG5bpNKcEqfYSd7Q9yLKAhpU_iGc&itag=299&aitags=133%2C134%2C135%2C136%2C160%2C242%2C243%2C244%2C247%2C278%2C298%2C299%2C302%2C303%2C308%2C315%2C394%2C395%2C396%2C397%2C398%2C399%2C400%2C401%2C597%2C598&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&met=1736491137%2C&mh=sb&mm=31%2C26&mn=sn-5hne6nzd%2Csn-4g5ednss&ms=au%2Conr&mv=m&mvi=1&pl=16&rms=au%2Cau&initcwndbps=4620000&bui=AfMhrI9SoEwCTmxm4_39e7rgjeskGVJj-vqmooNpgxsZHjR6o0ulg0sLM-u95_NTYcjDOaIDre4fbHXa&spc=x-caUJCqdyTAoXDK&vprv=1&svpuc=1&mime=video%2Fmp4&ns=IfoYYCaT2-2OcodoFFgOuf0Q&rqh=1&gir=yes&clen=342699157&dur=653.283&lmt=1735967490890937&mt=1736490792&fvip=2&keepalive=yes&fexp=51326932%2C51331020%2C51335594%2C51353498%2C51371294&c=MWEB&sefc=1&txp=5532434&n=C2yQtDm1cQ0WvQ&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cxpc%2Cbui%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&sig=AJfQdSswRQIgJHGiT2AD4frWnDB9o0R97pff4xjd_UPU6_210d83QswCIQD-Q9m-u2kEmX1x9ymLUffxxQ6vTK_tm89-pzTeHXsPyA%3D%3D&lsparams=met%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Crms%2Cinitcwndbps&lsig=AGluJ3MwRgIhAMxE6QMxlpH9HNIwdD12ZOGizmguFJyA7147BPbU-cNRAiEAiDCzFNjzrAjq6TvMKqnZLkVR9Z3yvR6WMDjGzC1RTaw%3D'
[dashsegments] Total fragments: 33
[download] Destination: /dev/shm/test-ytd/Experimental Evidence of Photons Experiencing Negative Time.f299.mp4
[download] 100% of 326.82MiB in 00:13
[debug] Invoking downloader on 'https://rr1---sn-5hne6nzd.googlevideo.com/videoplayback?expire=1736512737&ei=gcCAZ_bxHLiPi9oPndXN0Qs&ip=<REDACTED>&id=o-AJTxm_nJRVp8Pz8dCG5bpNKcEqfYSd7Q9yLKAhpU_iGc&itag=140&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&met=1736491137%2C&mh=sb&mm=31%2C26&mn=sn-5hne6nzd%2Csn-4g5ednss&ms=au%2Conr&mv=m&mvi=1&pl=16&rms=au%2Cau&initcwndbps=4620000&bui=AfMhrI9SoEwCTmxm4_39e7rgjeskGVJj-vqmooNpgxsZHjR6o0ulg0sLM-u95_NTYcjDOaIDre4fbHXa&spc=x-caUJCqdyTAoXDK&vprv=1&svpuc=1&xtags=acont%3Doriginal%3Alang%3Den-US&mime=audio%2Fmp4&ns=IfoYYCaT2-2OcodoFFgOuf0Q&rqh=1&gir=yes&clen=10574806&dur=653.363&lmt=1735948614756042&mt=1736490792&fvip=2&keepalive=yes&fexp=51326932%2C51331020%2C51335594%2C51353498%2C51371294&c=MWEB&sefc=1&txp=5532434&n=C2yQtDm1cQ0WvQ&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cbui%2Cspc%2Cvprv%2Csvpuc%2Cxtags%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&sig=AJfQdSswRAIgDz8Bd3QPTrSpJFrmUMienUCkM3onZ1uYFh582SXgp6ACIH7QMx-iSqNChn2bKB516rylex7xMJ8_xtlSFjolkjBr&lsparams=met%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Crms%2Cinitcwndbps&lsig=AGluJ3MwRgIhAMxE6QMxlpH9HNIwdD12ZOGizmguFJyA7147BPbU-cNRAiEAiDCzFNjzrAjq6TvMKqnZLkVR9Z3yvR6WMDjGzC1RTaw%3D'
[dashsegments] Total fragments: 2
[download] Destination: /dev/shm/test-ytd/Experimental Evidence of Photons Experiencing Negative Time.m4a.f140.m4a
[download] 100% of 10.08MiB in 00:00
[ffmpeg] Merging formats into "/dev/shm/test-ytd/Experimental Evidence of Photons Experiencing Negative Time.mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:/dev/shm/test-ytd/Experimental Evidence of Photons Experiencing Negative Time.f299.mp4' -i 'file:/dev/shm/test-ytd/Experimental Evidence of Photons Experiencing Negative Time.m4a.f140.m4a' -c copy -map 0:v:0 -map 1:a:0 'file:/dev/shm/test-ytd/Experimental Evidence of Photons Experiencing Negative Time.temp.mp4'
Deleting original file /dev/shm/test-ytd/Experimental Evidence of Photons Experiencing Negative Time.f299.mp4 (pass -k to keep)
Deleting original file /dev/shm/test-ytd/Experimental Evidence of Photons Experiencing Negative Time.m4a.f140.m4a (pass -k to keep)
[ffmpeg] Adding thumbnail to "/dev/shm/test-ytd/Experimental Evidence of Photons Experiencing Negative Time.mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:/dev/shm/test-ytd/Experimental Evidence of Photons Experiencing Negative Time.mp4' -i 'file:/dev/shm/test-ytd/Experimental Evidence of Photons Experiencing Negative Time.jpg' -c copy -map 0 -map 1 -disposition:v:1 attached_pic 'file:/dev/shm/test-ytd/Experimental Evidence of Photons Experiencing Negative Time.temp.mp4' |
Probably a continuation of item 2 here. |
At this point, YouTube is doing it intentionally, right? People report error 403, a fix/workaround is found, and then a few days later, 403 errors again. |
I don't suppose that YT ships code accidentally, though with LLM assistance who knows. The imposition of the PO Token challenge in the various player clients looks like a plan being enacted. The 403 error with On a limited test, format 18 seems unaffected, which is a work-around even if eagle-eyed users find the content unsatisfactory. Presumably the change linked above will resolve the issue for some period. Maybe TV YT apps are less amenable to updating than mobile apps so that the period could be longer than a few days. |
For what it's worth... When youtube-dl stops working, I sitch to a version of yt-dlp, back-ported by nicolaasjan, which runs on my old system. I updated it yesterday, and so far it seems unaffected. All the formats seem to be downloading normally. I just downloaded a video with f136 video (720p) and f140 audio, and it worked fine. I know someone is going to ask why I don't just use yt-dlp all the time. Well, it's because the executable takes significantly longer to run than youtube-dl, and it seems more CPU intensive as well. Don't get me wrong, I'm grateful for it working at all, and to nicolaasjan for continuing to back-port it for older Windows versions, but I'd prefer to use youtube-dl if possible. |
What would be useful to know is which client is being used in your yt-dlp to fetch the successful formats, or even just the version. |
You mean the user agent? If so; Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36 I've tried setting that with youtube-dl, but it didn't work. Here's a verbose log from a successful download of formats 136+140. I trimmed out the download progress messages as I don't think they add any useful information. [debug] Command-line config: ['-f', '136+140', '--verbose', 'https://www.youtube.com/watch?v=Kr2HK_rurho'] [download] 100% of 19.30MiB in 00:00:04 at 4.01MiB/s [download] 100% of 8.58MiB in 00:00:02 at 3.54MiB/s |
OK, so that's the version (2025.01.13) with the commit linked above, selecting the |
Seems to work (for now...). 😀️ youtube-dl -v Kr2HK_rurho
[debug] System config: []
[debug] User config: ['--rm-cache-dir', '-i', '-o', '/dev/shm/test-ytd/%(title)s.%(ext)s', '-f', 'bestvideo[height<=1080][ext=mp4][vcodec^=avc]+bestaudio[ext=m4a]/best[ext=mp4]/best', '--no-mtime', '--embed-thumbnail', '--force-ipv4', '--cookies', 'cookies.txt']
[debug] Custom config: []
[debug] Command-line args: ['-v', 'Kr2HK_rurho']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2025.01.15
[debug] Lazy loading extractors enabled
[debug] Single file build
[debug] Python 3.10.12 (CPython x86_64 64bit) - Linux-5.15.0-130-generic-x86_64-with-glibc2.35 - OpenSSL 3.0.2 15 Mar 2022 - glibc 2.35
[debug] exe versions: ffmpeg N-118301-g851a84650e-20250113, ffprobe N-118301-g851a84650e-20250113, rtmpdump 2.4
[debug] Proxy map: {}
Removing cache dir /home/nico/.cache/youtube-dl ...
[youtube] Kr2HK_rurho: Downloading webpage
[youtube] Kr2HK_rurho: Downloading TVHTML5 API JSON
[youtube] Kr2HK_rurho: Downloading player 0b866fa6
[debug] [youtube] Decrypted nsig 9vuc06WSd4g24q8A => DPutHL0F5FYkWg
[debug] [youtube] Decrypted nsig s_8NWKjE4rk4adH2 => OE7n8z9PYILITg
[youtube] Kr2HK_rurho: Downloading thumbnail ...
[youtube] Kr2HK_rurho: Writing thumbnail to: /dev/shm/test-ytd/Commodore Amiga 500 - ACA500+ Accelerator Card - FULL REVIEW.jpg
[debug] Invoking downloader on 'https://rr3---sn-5hnekn7s.googlevideo.com/videoplayback?expire=1736949572&ei=5GqHZ6rgNvLk6dsPyYSK4A0&ip=<REDACTED>&id=o-AHQ9OKCt35TIK6j3mo2nkCihKSYoT0hy5h_6F-Y0ymNe&itag=137&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C271%2C278%2C313&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&met=1736927972%2C&mh=8S&mm=31%2C26&mn=sn-5hnekn7s%2Csn-4g5edndl&ms=au%2Conr&mv=m&mvi=3&pl=16&rms=au%2Cau&initcwndbps=3952500&bui=AY2Et-NwxkxjCFIZmFEtJMYI1Cwk5sbZDRvM6kBI2AhoNo8pRLpOMR59Q2igMZt0k1vILq7RYAnduz3E&spc=9kzgDffBRsJBZa5o&vprv=1&svpuc=1&mime=video%2Fmp4&ns=joR9vUnT9ELW1s8t3MW4kS8Q&rqh=1&gir=yes&clen=70654451&dur=556.088&lmt=1723822457414094&mt=1736927562&fvip=2&keepalive=yes&lmw=1&fexp=51326932%2C51335594%2C51353498%2C51371294&c=TVHTML5&sefc=1&txp=4432434&n=OE7n8z9PYILITg&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cxpc%2Cbui%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&sig=AJfQdSswRQIhAPMj7Cr8dhmJcTGPIN21h7D-RhiMRLmD147XijDBKGB8AiBu9XD3swNxXOfFU_t6H94qKVWAtxYB60M5HabdRzDvag%3D%3D&lsparams=met%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Crms%2Cinitcwndbps&lsig=AGluJ3MwRAIgaj24HT0Hp3juHAnVyo0Law7tMeJLNfy8kaDl1vXYwYcCICkMvUBo7HQbGii6AIdYboRHr07cGtvc_1-DhNKdowOy'
[dashsegments] Total fragments: 7
[download] Destination: /dev/shm/test-ytd/Commodore Amiga 500 - ACA500+ Accelerator Card - FULL REVIEW.f137.mp4
[download] 100% of 67.38MiB in 00:03
[debug] Invoking downloader on 'https://rr3---sn-5hnekn7s.googlevideo.com/videoplayback?expire=1736949572&ei=5GqHZ6rgNvLk6dsPyYSK4A0&ip=<REDACTED>&id=o-AHQ9OKCt35TIK6j3mo2nkCihKSYoT0hy5h_6F-Y0ymNe&itag=140&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&met=1736927972%2C&mh=8S&mm=31%2C26&mn=sn-5hnekn7s%2Csn-4g5edndl&ms=au%2Conr&mv=m&mvi=3&pl=16&rms=au%2Cau&initcwndbps=3952500&bui=AY2Et-NwxkxjCFIZmFEtJMYI1Cwk5sbZDRvM6kBI2AhoNo8pRLpOMR59Q2igMZt0k1vILq7RYAnduz3E&spc=9kzgDffBRsJBZa5o&vprv=1&svpuc=1&xtags=drc%3D1&mime=audio%2Fmp4&ns=joR9vUnT9ELW1s8t3MW4kS8Q&rqh=1&gir=yes&clen=9001872&dur=556.141&lmt=1723814401078158&mt=1736927562&fvip=2&keepalive=yes&lmw=1&fexp=51326932%2C51335594%2C51353498%2C51371294&c=TVHTML5&sefc=1&txp=4432434&n=OE7n8z9PYILITg&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cbui%2Cspc%2Cvprv%2Csvpuc%2Cxtags%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&sig=AJfQdSswRQIhALjrFcK7Qos_Z4F4w7sevgH8tSonlKDObtq_TrbvL5dPAiApjd0guW_eH0zjlVs9zMp4CDKuxyfNMYQwVkGwqmKgmw%3D%3D&lsparams=met%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Crms%2Cinitcwndbps&lsig=AGluJ3MwRAIgaj24HT0Hp3juHAnVyo0Law7tMeJLNfy8kaDl1vXYwYcCICkMvUBo7HQbGii6AIdYboRHr07cGtvc_1-DhNKdowOy'
[dashsegments] Total fragments: 1
[download] Destination: /dev/shm/test-ytd/Commodore Amiga 500 - ACA500+ Accelerator Card - FULL REVIEW.m4a.f140-drc.m4a
[download] 100% of 8.58MiB in 00:01
[ffmpeg] Merging formats into "/dev/shm/test-ytd/Commodore Amiga 500 - ACA500+ Accelerator Card - FULL REVIEW.mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:/dev/shm/test-ytd/Commodore Amiga 500 - ACA500+ Accelerator Card - FULL REVIEW.f137.mp4' -i 'file:/dev/shm/test-ytd/Commodore Amiga 500 - ACA500+ Accelerator Card - FULL REVIEW.m4a.f140-drc.m4a' -c copy -map 0:v:0 -map 1:a:0 'file:/dev/shm/test-ytd/Commodore Amiga 500 - ACA500+ Accelerator Card - FULL REVIEW.temp.mp4'
Deleting original file /dev/shm/test-ytd/Commodore Amiga 500 - ACA500+ Accelerator Card - FULL REVIEW.f137.mp4 (pass -k to keep)
Deleting original file /dev/shm/test-ytd/Commodore Amiga 500 - ACA500+ Accelerator Card - FULL REVIEW.m4a.f140-drc.m4a (pass -k to keep)
[ffmpeg] Adding thumbnail to "/dev/shm/test-ytd/Commodore Amiga 500 - ACA500+ Accelerator Card - FULL REVIEW.mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:/dev/shm/test-ytd/Commodore Amiga 500 - ACA500+ Accelerator Card - FULL REVIEW.mp4' -i 'file:/dev/shm/test-ytd/Commodore Amiga 500 - ACA500+ Accelerator Card - FULL REVIEW.jpg' -c copy -map 0 -map 1 -disposition:v:1 attached_pic 'file:/dev/shm/test-ytd/Commodore Amiga 500 - ACA500+ Accelerator Card - FULL REVIEW.temp.mp4'
|
Only issues when also passing cookies... |
On 15/01/2025 18:08, nicolaasjan wrote:
Only issues when also passing cookies...
See: Issue #12085 <yt-dlp/yt-dlp#12085> (yt-dlp).
This shouldn't affect the build you showed, because `web_creator` was
never used in the first place.
|
@dirkf |
That makes sense. But we don't have a general way to detect |
At this point, all HTTP and DASH formats except |
Sadly no |
Checklist
Verbose log
Description
youtube-dl 'https://www.youtube.com/watch?v=lLSkbZ3-EOs'
The text was updated successfully, but these errors were encountered: