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
Multiple JSON page requests made before falling back to watch page #815
Comments
sometimes when clearing the ytdl-core internal cache, the app would still hang, waiting for any entries in the cache to expire.
the json endpoint returning |
@fent surely we aren't intending on passing a header with |
🎉 This issue has been resolved in version 4.1.7 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hey @fent, I think we need to revisit. I'm still seeing promises being sent in the x-youtube-identity-token. Would you be open to my submitting a pull-request to fix? |
fent is currently taking a bit of a break |
Created a comment on the relevant line here: 60cdb41#r44919269
Basically it appears that the token logic is setting a promise to the cache rather than the actual value now. As a result I'm seeing ytdl make a bunch of json requests all with "reload now" responses before finally falling back to the watch page.
It does eventually resolve with the right information, but it's causing the performance to be sub-par (~several seconds for getInfo).
Here is a network trace with the current logic:
First request:
Second request:
And by updating
getIdentityToken
to this: (basically don't usecookieCache.getOrSet
, actually make it a promise andcookieCache.set
in the later part of the promise):First request:
Second request:
The text was updated successfully, but these errors were encountered: