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.

503 error from Youtube

See original GitHub issue

Every time I try to watch a youtube video the following message appears:

breadmaker@hostname:~$ livestreamer youtube.com/watch?v=tufY_UfHsow best
[cli][info] Found matching plugin youtube for URL youtube.com/watch?v=tufY_UfHsow
error: Unable to open URL: http://youtube.com/get_video_info (503 Server Error: Service Unavailable for url: http://ipv4.google.com/sorry/IndexRedirect?continue=http://youtube.com/get_video_info%3Fel%3Dplayer_embedded%26video_id%3DtufY_UfHsow&q=CGMSBL5fLXQYw9C2uAUiGQDxp4NLDKn_kPXhn7B7vUfn3HF6NlghoBoqSWh0dHA6Ly95b3V0dWJlLmNvbS9nZXRfdmlkZW9faW5mbz9lbD1wbGF5ZXJfZW1iZWRkZWQmdmlkZW9faWQ9dHVmWV9VZkhzb3c)

For the record, the video can be watched via broswer without problems.

Using livestreamer 1.12.2 with Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:3
  • Comments:44

github_iconTop GitHub Comments

18reactions
ghostcommented, Apr 15, 2016

If use proper user-agent string, then it is accepted and working again! https://github.com/nitpicker/livestreamer/commit/d5d814fbf673c8bf62c5d34cfed824f8088e30a4

Save https://raw.githubusercontent.com/nitpicker/livestreamer/d5d814fbf673c8bf62c5d34cfed824f8088e30a4/src/livestreamer/plugins/youtube.py to your livestream plugin folder

Is it a profit or law issue??

[Edited] For guy who is unfamiliar with python, there is pre-built one at https://github.com/nitpicker/livestreamer/releases/download/untagged-781898b0704c7ac99ca2/livestreamer-1.12.2.win-amd64.zip (Python 2.7/Windows x64)

6reactions
saucecodecommented, Apr 28, 2016

Quicker solution: Run as: livestreamer --http-header "User-Agent"="UA" https://www.youtube.com/watch?v=123

Where UA is a user agent string, such as that which appears at http://whatsmyuseragent.com/

This error comes because YouTube treats livestreamer’s HTTP requests as bot requests. The ipv4.google.com address that comes out with the error is a redirect to a captcha page. As far as I know there is no way for livestreamer to prompt a user to solve the captcha. Using a recognised user agent solves this problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix Network Error 503 on YouTube - Appuals.com
Connection timeout – A connection timeout is known to occur in instances where the APN settings have been modified from their default values....
Read more >
Fix YouTube Network Error 503 - TechCult
The server-side response code 503 denotes that the site server is presently unavailable. It commonly occurs when you see a message that there ......
Read more >
Fix Youtube Error: There was a problem with the server [503]
The error 503 indicates that there is an issue with the Youtube server. It cannot handle the request to load the videos due...
Read more >
Understand and fix Youtube 503 status code - DebugBar
The 503 error on Youtube corresponds to an HTTP response code returned by the server where the Youtube video you wanted to see...
Read more >
How to Fix YouTube Error 503 in 2022 (Desktop and Mobile)
503 error is a server-related issue. Due to overloading, server maintenance, corrupted cache, or a connection timeout, YouTube cannot load ...
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