-
Notifications
You must be signed in to change notification settings - Fork 164
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
Video URI throwing System.ArgumentOutOfRangeException #25
Comments
I think I've found the problem for this issue. You just need to change a single line in YouTubeVideo.Decrypt.cs. You need to change this function: to this: It gives this exception, because YouTube has probably changed the javascript. I think it has been changed from |
Yeah that works. It worked for all of the ~100 videos I tested it on. Thanks. |
Thanks for reporting this, guys. I'll publish a new NuGet package by tonight. |
Possibly related: ovnisoftware/YoutubeExtractor@6126488 |
No problem, happy to help. It would probably be the best to check for both function br(a) and br=function(a) though, might they change it back in the future. Could save some work later on. Good evening! |
It seems like youtube has updated again, so the issue is back. No worries though, because the fix is really easy again. It seems to have changed from so instead of checking for the var like we have now: we change it to: This seems to fix it again for now. |
Fixed again; I'll upload the new NuGet package within a few minutes. Thanks @rubensollie for notifying me. |
It is happening again. :( |
…ty use GetUriAsync
So I was trying to use this to download YouTube videos. It was working fine, then quite a few different YouTube URLs starting throwing errors when I tried to download it.
In this case "downloadInfo.YouTubeID" is "Ip6ex1vqf6I"
Here is the relevant code:
var yt = YouTube.Default;
var video = yt.GetVideo( "https://youtube.com/watch?v=" + downloadInfo.YouTubeID );
// throws on this line
File.WriteAllBytes( videoPath, video.GetBytes() );
I've noticed that in debugging mode, I can look at the YouTubeVideo object generated by
yt.GetVideo
, and the URI property is at fault, as it saysvideo.Uri threw an exception of type System.ArgumentOutOfRangeException
Here is the stack trace if it helps.
Thanks!
The text was updated successfully, but these errors were encountered: