-
Notifications
You must be signed in to change notification settings - Fork 816
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
Very rare 403 error when streaming from YouTube #417
Comments
I've seen this a few times in tests. If you'd like to test if simply retrying the request fixes it, you can change this line https://github.com/fent/node-miniget/blob/master/lib/index.js#L124 to use If this doesn't work, we'd have to retry on ytdl-core level, by making a fresh call to |
Same issue |
|
YouTube sometimes will provide a different signature type for URLs that appears to be base64'd, rather than the usual
becomes:
So the It appears to be more common on music videos, appearing roughly 1 out of 40. Here's the relevant line in Invidious and a relevant PR in youtube-dl. |
I tried to change this line like mentioned above
|
Any update on this issue ? |
I have the same problem. |
same issue here :/ |
Any updates on this issue ? |
Do you have more info about it? Because of the new "sig" is in a different format: And the old format is: Do i have to use the same decrypt method? or need to do something else? |
Unfortunately I haven't had much time to look into it, but you use the same decrypt function. Only thing to keep in mind is that "sig" should be URI-unescaped, so:
You should be able to tell if the function has been decrypted succesfully because all the padding ( |
it's not decrypted. what's the video id? |
Hi!
Thanks for the response!
If you could try with this link for example:
https://youtu.be/vm-wCbAib1M
If I get the URL for the audioonly tag 140 from a server, and then try to
open the same link any where else I'm not able to!
Is there any function to decrypt this url using JavaScript? I see everyone
talking about this but it's been 6 months already and I've never figured
out how to decrypt it! :(
Thanks already!
…On Tue, 18 Feb 2020 at 10:33 fent ***@***.***> wrote:
it's not decrypted. what's the video id?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#417?email_source=notifications&email_token=AIXZXYU5A7IF7X5VZX4QFJLRDPPQ5A5CNFSM4G2AF2T2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMB7I4I#issuecomment-587461745>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIXZXYSXHL6FVFP2CKWGRW3RDPPQ5ANCNFSM4G2AF2TQ>
.
|
are you using the latest version of `ytdl-core`, I'm getting an object
that has a `cipher` property for that format. and are you using
`ytdl.getBasicInfo`? `ytdl.getInfo` deciphers download URLs, but not
`ytdl.getBasicInfo`.
|
I'm only using getInfo!!
…On Tue, 18 Feb 2020 at 17:04 fent ***@***.***> wrote:
are you using the latest version of `ytdl-core`, I'm getting an object
that has a `cipher` property for that format. and are you using
`ytdl.getBasicInfo`? `ytdl.getInfo` deciphers download URLs, but not
`ytdl.getBasicInfo`.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#417?email_source=notifications&email_token=AIXZXYRTM7O4HKGEYHKSOITRDQ5LLA5CNFSM4G2AF2T2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMEHVWI#issuecomment-587758297>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIXZXYVJRQQSA2FZLCNPKNDRDQ5LLANCNFSM4G2AF2TQ>
.
|
I had the same error today and I fixed it by generating another API key Google Developer Console The error was:
|
same issue how can we keeps continue even if a 403 error appear right now stream is stopped and download is canceled how to fix this please ? |
@asmirbelkic please keep the discussion in the #932 thread |
Very rarely I get a 403 error when trying to stream a YouTube video with my discord bot.
However, I can then immediately retry to play the exact same video and then it works.
I haven't found a consistent way of reproducing this error and it is quite rare, maybe 1 in 1000 stream attempts would be my guess. Also continuously trying to stream the same video doesn't seem to be able to reproduce the error. So any attempt would have to probably use a collection of a lot of different videos (1000+) and have a lot of time, but hopefully there is another way of figuring this out.
Here is the stack trace (which seems quite useless, as it's just the status code that miniget receives):
The error always seems to appear twice (I only posted one to keep the text shorter), completely identically. I thought your miniget module would only retry on a 500 error, so I'm not sure why it shows up twice.
I am using the newest ytdl-core like this
stream = ytdl(url, opts);
.And I'm using discord.js on the master branch, where I pass the stream like this
this.conn.play(this.stream, opts);
I think if ytdl-core could simply retry once after receiving a 403, this might solve the problem. Of course a 403 with
This video is not available.
would need no retry. If I'm not mistaken ytdl-core doesn't retry on a receiving a 403 as of now, of course rightly so as normally a 403 means that the video is not available.In this case, I think something might be going wrong on YouTube's side, but we can't just wait for them to fix it. And I know that this is quite a difficult problem, as it is not easily reproducible.
If you do not want to change anything in this module, because this error is very vague, I would gladly try out a changed version myself, I might just need a hint how I could add a retry when a 403 is received.
The text was updated successfully, but these errors were encountered: