Closed tuanbs closed 6 years ago
Well you can't get unavailable videos form youtube.
Indeed, the error is actually accurate, the video cannot be opened.
But I can download it using youtube-dl. What's wrong with YoutubeExplode?
I would be more curious what is it that Youtube-dl is doing that lets it download unavailable videos
I would be more curious what is it that Youtube-dl is doing that lets it download unavailable videos
Hi, I mean the video is available from this url: https://www.youtube.com/watch?v=KOOtkK1F734
and I'm able to download it using youtube-dl. But YoutubeExplode cannot download it.
I'm getting video unavailable too, it is probably region locked
I feel there needs to be more of a descriptive error message here from the lib. Video not available
without any real context or anything to go off of isn't great. It be nice if we could get an enum or something that allows us end users to programmatically figure out why something is unavailable and do something about it.
I don't think youtube supplies that information
just to confirm, youtube-dl cant download it either: https://image.prntscr.com/image/hUSlVy6fTIinLksIcfaN1A.png
just to confirm, youtube-dl cant download it either: https://image.prntscr.com/image/hUSlVy6fTIinLksIcfaN1A.png
I can download it:
I also believe it is totally possible to get the reason for unavailability. There are websites out there that allow you to check if a video is region locked, so I don't see why YoutubeExplode couldn't do that too. I'd imagine there'd also be ways to parse the page and figure out if a video is age restricted, copyright claimed, etc.
YoutubeExplode working here,
this video https://www.youtube.com/watch?v=KOOtkK1F734
I think this is indeed country block and YtDl is doing something to circumvent it, probably. Although it's weird that it still failed for @shaked6540
I'm not sure and I did not stop to study.
Seens youtube-dl use a common User-Agent
Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
YoutubeExplode use exclusive User-Agent.
YoutubeExplode (github.com/Tyrrrz/YoutubeExplode)
If someone with error this video is not available, want try change User-Agent header.
Maybe it will not change anything, but it does not hurt to try.
I just tried that, same error I think its blocking by IP and not user agent
I can't download with yt-dl either.
It looks like it's in fact not country blocked, at least for me.
Today I got another error message:
Additional text encountered after finished reading JSON content: }. Path '', line 1, position 15048.
Details:
at Newtonsoft.Json.JsonTextReader.Read()
at Newtonsoft.Json.Linq.JToken.Parse(String json, JsonLoadSettings settings)
at YoutubeExplode.YoutubeClient.<GetVideoEmbedPageConfigAsync>d__31.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at YoutubeExplode.YoutubeClient.<GetVideoPlayerContextAsync>d__36.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at YoutubeExplode.YoutubeClient.<GetVideoMediaStreamInfosAsync>d__40.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Web.Controllers.WebApi.FilesController.<GetYoutubeInfoByYoutubeVideoUrl>d__8.MoveNext() in
There were just some of videos in my website got this error when I posted this issue. But now all of videos have this error. Any help or idea would be much appreciated. Thanks in advance.
@tuanbs this is a different issue #164 is what you are looking for.
I'm using the latest version 4.3.3 and got the error message:
Video [KOOtkK1F734] is not available and cannot be processed. Code: 150. Reason: This video is not available..
. Its Youtube url is:https://www.youtube.com/watch?v=KOOtkK1F734
.Details:
Thanks in advance for any help. Cheers.