question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Forbidden on some videos

See original GitHub issue

Some videos throws 403 Forbidden http exception, I tried to pass by constructor a new HttpClient with the right cookies to be loggedin.

Random video from logs: LanCLS_hIo4, 9ssRfVj92OA,

Any workaround?

Thanks

System.Net.Http.HttpRequestException: Response status code does not indicate success: 403 (Forbidden).
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at YoutubeExplode.Internal.HttpClientEx.GetStreamAsync(HttpClient client, String requestUri, Nullable`1 from, Nullable`1 to, Boolean ensureSuccess)
   at YoutubeExplode.Internal.SegmentedHttpStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)
   at YoutubeExplode.Internal.Extensions.CopyToAsync(Stream source, Stream destination, IProgress`1 progress, CancellationToken cancellationToken, Int32 bufferSize)
   at YoutubeExplode.YoutubeClient.DownloadMediaStreamAsync(MediaStreamInfo info, Stream output, IProgress`1 progress, CancellationToken cancellationToken)
   at YoutubeExplode.YoutubeClient.DownloadMediaStreamAsync(MediaStreamInfo info, String filePath, IProgress`1 progress, CancellationToken cancellationToken)
   at YoutubeExplode.Converter.YoutubeConverter.DownloadAndProcessMediaStreamsAsync(IReadOnlyList`1 mediaStreamInfos, String filePath, String format, IProgress`1 progress, CancellationToken cancellationToken)

image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:40 (8 by maintainers)

github_iconTop GitHub Comments

13reactions
Tyrrrzcommented, Apr 5, 2020

Thanks @MeteorBurn

I’ve looked into it, I think I have an idea how to solve this. The issue is that to accommodate the changes, I have to rework some parts in the library. I have already started working on it, will hopefully finish it next week if I will have the time.

9reactions
Tyrrrzcommented, Apr 3, 2020

Will try on the weekend.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Impossible to download some videos (HTTP Error 403
Hey, so since two or three days ago, youtube-dl has been giving me the answer 'HTTPError: HTTP Error 403: Forbidden' on some videos, ......
Read more >
What Is the 403 Forbidden Error and How to Fix It (8 ...
How to Fix the 403 Forbidden Error – Video Tutorial. Learn the most common causes and how to fix the 403 forbidden error....
Read more >
forbidden error while fetching YouTube videos list from the ...
The videos.list method returns a forbidden (403) error when an improperly authorized request tries to retrieve the details of a video ...
Read more >
How to Fix a 403 Forbidden Error on Your Site
The 403 Forbidden error means that your server is working, but you no longer have permission to view all or some of your...
Read more >
[YouTube] 403 HTTP error when trying to play some videos
I think I have the same issue. Exception. User Action: play stream; Request: Player error[type=ERROR_CODE_IO_BAD_HTTP_STATUS] occurred while ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found