Closed ehoogeveen-medweb closed 2 weeks ago
cc @coletdjnz
I added a print statement for request.headers
and got the following example:
{
'Content-Type': 'application/json',
'X-Youtube-Client-Name': '5',
'X-Youtube-Client-Version': '19.09.3',
'Origin': 'https://www.youtube.com',
'User-Agent': 'com.google.ios.youtube/19.09.3 (iPhone14,3; U; CPU iOS 15_6 like Mac OS X)',
'Authorization': 'SAPISIDHASH ***_***',
'X-Origin': 'https://www.youtube.com',
'X-Goog-Authuser': '0'
}
request.url
was https://www.youtube.com/youtubei/v1/player?key=AIzaSyB-63vPrdThhKuerbB2N_l7Kwwcxj6yUAc&prettyPrint=false
@ehoogeveen-medweb I'd suggest logging out of your current Youtube session in Firefox out of an abundance of caution. Your reply contained a potentially sensitive Authorization
header. It has since been edited/redacted, but it still exists in repo subscription emails and github archive sites.
Ah - will do, thanks!
You are running a modified/unofficial/unsupported version of urllib3. We only support the official urllib3 with no modifications.
Looking at the version string, this seems like urllib3.future
. CC @Ousret if you want to migrate this issue to jawah/urllib3.future
Oh! I didn't realize at all. You're right, I had urllib3-future installed, although I don't remember installing it.
Thank you for bringing this to my attention.
You were accessing YouTube using HTTP/3.
After digging into this, the issue here was a qpack encoder/decoder desync that can happen depending on your network. A fix has been written and published.
Sorry for the inconvenience.
If you would test it, I would be grateful pip install qh3 -U
(v1.0.5) and even more if you could post a issue at https://github.com/jawah/urllib3.future if the issue persist.
although I don't remember installing it.
it is the core dependency of Niquests, you may have installed it directly or through another library that depend on it. while we're at it, could you say whether or not HTTP/3 improved your experience (outside of this incident..) (speed, latency, etc...)?
regards,
Ah, that explains it. I'll try using it again and let you know if it happens again. I've been on holiday with slow internet so I don't have a good point of reference regarding performance, sorry.
Update: It looks like the issues I was having have been fixed; I can run with urllib3.future
without setting --no-check-certificates
now without getting any errors or warnings.
DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE
Checklist
Region
No response
Provide a description that is worded well enough to be understood
I've been having this issue intermittently on YouTube recently, mostly with recently finished livestreams. The videos still seem to download okay despite the error (but it says to report the issue, so here we are).
Without
--no-check-certificates
I've seen the following warnings:WARNING: [youtube] TLS over QUIC did not succeed. Chain certificate verification failed or client cert validation failed
However I don't know for sure if those warnings are related to the error, or if they've just happened to coincide (as I normally run with
--no-check-certificates
enabled and only disabled it for testing). Those warnings don't seem to include any additional information.Provide verbose output that clearly demonstrates the problem
yt-dlp -vU <your command line>
)'verbose': True
toYoutubeDL
params instead[debug] Command-line config
) and insert it belowComplete Verbose Output