[Youtube] Download error is silent during subtitle download
See original GitHub issueChecklist
- I’m reporting a broken site
- I’ve verified that I’m running yt-dlp version 2022.03.08.1. (update instructions)
- I’ve checked that all provided URLs are alive and playable in a browser
- I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
- I’ve searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
- I’ve read the guidelines for opening an issue
- I’ve read about sharing account credentials and I’m willing to share it if required
Region
No response
Description
Reproduction:
- Use (old) legit cookies across 2 IPs (residential IPv4 and IPv6)
- Videos, comments download fine, no “too many requests” errors
- yt-dlp tries to download subtitles after fetching comments
- No error, exit code 1
Reason:
I ran into “too many requests”, but yt-dlp showed no error at all. Instead it exits silently and gives no error message
Expected:
yt-dlp should print a correct error message
Workaround:
Change cookies (e.g. empty cookie file works again). Looks like there’s harsher rate-limiting per cookie identity instance since browser/empty cookies work fine on the same IP.
curl with properly loaded “broken” cookie file returns the automated requests error:
curl -c broken-vtt-cookies.txt -b broken-vtt-cookies.txt 'https://www.youtube.com/api/timedtext?v=GgpTBPTd_DA&asr_langs=de%2Cen%2Ces%2Cfr%2Cid%2Cit%2Cja%2Cko%2Cnl%2Cpt%2Cru%2Ctr%2Cvi&caps=asr&xoaf=4&hl=en&ip=0.0.0.0&ipbits=0&expire=1648012028&sparams=ip%2Cipbits%2Cexpire%2Cv%2Casr_langs%2Ccaps%2Cxoaf&signature=<removed>.<removed>&key=yt8&kind=asr&lang=ru&tlang=en&fmt=vtt' --verbose
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>Sorry...</title><style> body { font-family: verdana, arial, sans-serif; background-color: #fff; color: #000; }</style></head><body><div><table><tr><td><b><font face=sans-serif size=10><font color=#4285f4>G</font><font color=#ea4335>o</font><font color=#fbbc05>o</font><font color=#4285f4>g</font><font color=#34a853>l</font><font color=#ea4335>e</font></font></b></td><td style="text-align: left; vertical-align: bottom; padding-bottom: 15px; width: 50%"><div style="border-bottom: 1px solid #dfdfdf;">Sorry...</div></td></tr></table></div><div style="margin-left: 4em;"><h1>We're sorry...</h1><p>... but your computer or network may be sending automated queries. To protect our users, we can't process your request right now.</p></div><div style="margin-left: 4em;">See <a href="https://support.google.com/websearch/answer/86640">Google Help</a> for more information.<br/><br/></div><div style="text-align: center; border-top: 1px solid #dfdfdf;"><a href="https://www.google.com">Google Home</a></div></body></html>
You get a delicious cookies for reading this!
Verbose log
user@hostname /youtube-dl-folder/test
$ rm *.vtt; ../yt-dlp.exe --compat-options filename,abort-on-error,no-attach-info-json --write-sub --write-auto-sub --sub-lang en --ignore-config https://www.youtube.com/watch?v=GgpTBPTd_DA -f 139 -v --cookies broken-vtt-cookies.txt; echo $?
rm: cannot remove '*.vtt': No such file or directory
[debug] Command-line config: ['--compat-options', 'filename,abort-on-error,no-attach-info-json', '--write-sub', '--write-auto-sub', '--sub-lang', 'en', '--ignore-config', 'https://www.youtube.com/watch?v=GgpTBPTd_DA', '-f', '139', '-v', '--cookies', 'broken-vtt-cookies.txt']
[debug] Encodings: locale cp1251, fs utf-8, out cp1251 (No ANSI), err cp1251 (No ANSI), pref cp1251
[debug] yt-dlp version 2022.03.08.1 [c0c2c57] (win_exe)
[debug] Compatibility options: no-attach-info-json, filename, abort-on-error
[debug] Python version 3.8.10 (CPython 64bit) - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-90389-g72bb955625-ffmpeg-windows-build-helpers, ffprobe N-90389-g72bb955625-ffmpeg-windows-build-helpers
[debug] Optional libraries: brotli, Cryptodome, mutagen, sqlite, websockets
[debug] Proxy map: {}
[debug] [youtube] Extracting URL: https://www.youtube.com/watch?v=GgpTBPTd_DA
[youtube] GgpTBPTd_DA: Downloading webpage
[debug] [youtube] Extracted SAPISID cookie
[youtube] GgpTBPTd_DA: Downloading android player API JSON
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, codec:vp9.2, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), acodec, lang, proto, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, hasaud, id
[debug] Downloading subtitles: en
[info] GgpTBPTd_DA: Downloading 1 format(s): 139
[info] Writing video subtitles to: ▒▒▒▒ ▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒ ▒▒ ▒▒▒▒▒▒▒-GgpTBPTd_DA.en.vtt
[debug] Invoking downloader on "https://www.youtube.com/api/timedtext?v=GgpTBPTd_DA&asr_langs=de%2Cen%2Ces%2Cfr%2Cid%2Cit%2Cja%2Cko%2Cnl%2Cpt%2Cru%2Ctr%2Cvi&caps=asr&xoaf=4&hl=en&ip=0.0.0.0&ipbits=0&expire=1648012057&sparams=ip%2Cipbits%2Cexpire%2Cv%2Casr_langs%2Ccaps%2Cxoaf&signature=<removed>.<removed>&key=yt8&kind=asr&lang=ru&tlang=en&fmt=vtt"
1
Issue Analytics
- State:
- Created a year ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Issue with Youtube auto subtitle · Issue #2956 · yt-dlp ... - GitHub
The auto subtitles from youtube no longer work properly. Looking at the generated vtt and then converted ass subtitles the script is fully ......
Read more >Download youtube videos with youtube-dl
youtube -dl allows to download youtube movies from a shell or cmd.exe. ... --abort-on-error, Abort downloading of further videos (in the playlist or...
Read more >youtube-dl - download videos from ... - manpages.ubuntu!
When youtube-dl detects an HLS video, it can download it either with the built-in downloader or ffmpeg. Since many HLS streams are slightly...
Read more >MP4 No Sound? Fix Corrupted MP4 with Proven Ways [2022]
So you have downloaded your MP4 video online only to find out that the video has no sound ... change in video format,...
Read more >How to download youtube videos as a best quality audio mp3 ...
best is also needed for videos that don't come from YouTube because they don't provide the audio and video in two different files....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for your help in debugging the issue. If not for you identifying that the issue is not in cookies, this issue would have been (wrongly) stuck as cant-repro
I can reproduce the issue. I should have been more thorough when trying to reproduce. It is trigerring when a 429 happens with
--abort-on-error