Skip to content
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

error: unable to dowload wepage: HTTP Error 503 #13864

Closed
zhangxulong opened this issue Aug 9, 2017 · 22 comments
Closed

error: unable to dowload wepage: HTTP Error 503 #13864

zhangxulong opened this issue Aug 9, 2017 · 22 comments

Comments

@zhangxulong
Copy link

@zhangxulong zhangxulong commented Aug 9, 2017

youtube-dl https://youtu.be/n2tk2ctypUs --verbose
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'https://youtu.be/n2tk2ctypUs', u'--verbose']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.06.12
[debug] Python version 2.7.12 - Linux-4.10.0-27-generic-x86_64-with-Ubuntu-16.04-xenial
[debug] exe versions: ffmpeg 2.8.11-0ubuntu0.16.04.1, ffprobe 2.8.11-0ubuntu0.16.04.1, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] n2tk2ctypUs: Downloading webpage
ERROR: Unable to download webpage: HTTP Error 503: Service Unavailable (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 502, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 2129, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/usr/lib/python2.7/urllib2.py", line 435, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 467, in error
result = self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 654, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/usr/lib/python2.7/urllib2.py", line 435, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 473, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like this: [x])
  • Use the Preview tab to see what your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.08.06. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2017.08.06

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj']
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
[debug] youtube-dl version 2017.08.06
[debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2
[debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4
[debug] Proxy map: {}
...
<end of log>

If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):

Note that youtube-dl does not support sites dedicated to copyright infringement. In order for site support request to be accepted all provided example URLs should not violate any copyrights.


Description of your issue, suggested solution and other information

Explanation of your issue in arbitrary form goes here. Please make sure the description is worded well enough to be understood. Provide as much context and examples as possible.
If work on your issue requires account credentials please provide them or explain how one can obtain them.

@RenzHoly
Copy link

@RenzHoly RenzHoly commented Aug 9, 2017

same problem

$ youtube-dl https://www.youtube.com/watch\?v\=Toft6fMvByA --verbose
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'https://www.youtube.com/watch?v=Toft6fMvByA', u'--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.08.06
[debug] Python version 2.7.10 - Darwin-17.0.0-x86_64-i386-64bit
[debug] exe versions: avconv 12.1, avprobe 12.1
[debug] Proxy map: {}
[youtube] Toft6fMvByA: Downloading webpage
ERROR: Unable to download webpage: HTTP Error 503: Service Unavailable (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 502, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2166, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 437, in open
    response = meth(req, response)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 550, in http_response
    'http', request, response, code, msg, hdrs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 469, in error
    result = self._call_chain(*args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 656, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 437, in open
    response = meth(req, response)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 550, in http_response
    'http', request, response, code, msg, hdrs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 475, in error
    return self._call_chain(*args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 558, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
@zhangxulong
Copy link
Author

@zhangxulong zhangxulong commented Aug 9, 2017

youtube-dl https://www.youtube.com/watch?v=-k3qyjZNcX0 --verbose
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'https://www.youtube.com/watch?v=-k3qyjZNcX0', u'--verbose']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.08.06
[debug] Python version 2.7.12 - Linux-4.10.0-27-generic-x86_64-with-Ubuntu-16.04-xenial
[debug] exe versions: ffmpeg 2.8.11-0ubuntu0.16.04.1, ffprobe 2.8.11-0ubuntu0.16.04.1, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] -k3qyjZNcX0: Downloading webpage
ERROR: Unable to download webpage: HTTP Error 503: Service Unavailable (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 502, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2166, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/usr/lib/python2.7/urllib2.py", line 435, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 467, in error
result = self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 654, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/usr/lib/python2.7/urllib2.py", line 435, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 473, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

@zhangxulong
Copy link
Author

@zhangxulong zhangxulong commented Aug 9, 2017

youtube-dl -v https://www.youtube.com/watch?v=BaW_jenozKc --verbose
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'https://www.youtube.com/watch?v=BaW_jenozKc', u'--verbose']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.08.06
[debug] Python version 2.7.12 - Linux-4.10.0-27-generic-x86_64-with-Ubuntu-16.04-xenial
[debug] exe versions: ffmpeg 2.8.11-0ubuntu0.16.04.1, ffprobe 2.8.11-0ubuntu0.16.04.1, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] BaW_jenozKc: Downloading webpage
ERROR: Unable to download webpage: HTTP Error 503: Service Unavailable (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 502, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2166, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/usr/lib/python2.7/urllib2.py", line 435, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 467, in error
result = self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 654, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/usr/lib/python2.7/urllib2.py", line 435, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 473, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Aug 9, 2017

Hello all, could you run the following command and paste the output?

youtube-dl -v --print-traffic "https://www.youtube.com/watch?v=BaW_jenozKc"
@RenzHoly
Copy link

@RenzHoly RenzHoly commented Aug 9, 2017

@yan12125
It seems that my IP was baned by google
but I can visit youtube webpage

$ youtube-dl -v --print-traffic "https://www.youtube.com/watch?v=BaW_jenozKc"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'--print-traffic', u'https://www.youtube.com/watch?v=BaW_jenozKc']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.08.06
[debug] Python version 2.7.10 - Darwin-17.0.0-x86_64-i386-64bit
[debug] exe versions: avconv 12.1, avprobe 12.1
[debug] Proxy map: {}
[youtube] BaW_jenozKc: Downloading webpage
send: u'GET /watch?v=BaW_jenozKc&gl=US&hl=en&has_verified=1&bpctr=9999999999 HTTP/1.1\r\nAccept-Language: en-us,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\nConnection: close\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nUser-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/47.0 (Chrome)\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nHost: www.youtube.com\r\nCookie: PREF=f1=50000000&hl=en\r\n\r\n'
reply: 'HTTP/1.1 302 Found\r\n'
header: Location: https://ipv4.google.com/sorry/index?continue=https://www.youtube.com/watch%3Fv%3DBaW_jenozKc%26gl%3DUS%26hl%3Den%26has_verified%3D1%26bpctr%3D9999999999&hl=en&q=EgQvNAXSGNarq8wFIhkA8aeDSxBLtA4muMnYpc_AdvopyZe4YKBOMgNyY24
header: Date: Wed, 09 Aug 2017 09:28:55 GMT
header: Pragma: no-cache
header: Expires: Fri, 01 Jan 1990 00:00:00 GMT
header: Cache-Control: no-store, no-cache, must-revalidate
header: Content-Type: text/html; charset=UTF-8
header: Server: HTTP server (unknown)
header: Content-Length: 425
header: X-XSS-Protection: 1; mode=block
header: X-Frame-Options: SAMEORIGIN
header: Alt-Svc: quic=":443"; ma=2592000; v="39,38,37,36,35"
header: Connection: close
send: u'GET /sorry/index?continue=https://www.youtube.com/watch%3Fv%3DBaW_jenozKc%26gl%3DUS%26hl%3Den%26has_verified%3D1%26bpctr%3D9999999999&hl=en&q=EgQvNAXSGNarq8wFIhkA8aeDSxBLtA4muMnYpc_AdvopyZe4YKBOMgNyY24 HTTP/1.1\r\nAccept-Language: en-us,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\nConnection: close\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nUser-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/47.0 (Chrome)\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nHost: ipv4.google.com\r\n\r\n'
reply: 'HTTP/1.1 503 Service Unavailable\r\n'
header: Date: Wed, 09 Aug 2017 09:28:56 GMT
header: Pragma: no-cache
header: Expires: Fri, 01 Jan 1990 00:00:00 GMT
header: Cache-Control: no-store, no-cache, must-revalidate
header: Content-Type: text/html
header: Server: HTTP server (unknown)
header: Content-Length: 3269
header: X-XSS-Protection: 1; mode=block
header: X-Frame-Options: SAMEORIGIN
header: Alt-Svc: quic=":443"; ma=2592000; v="39,38,37,35"
header: Connection: close
ERROR: Unable to download webpage: HTTP Error 503: Service Unavailable (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 502, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2166, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 437, in open
    response = meth(req, response)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 550, in http_response
    'http', request, response, code, msg, hdrs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 469, in error
    result = self._call_chain(*args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 656, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 437, in open
    response = meth(req, response)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 550, in http_response
    'http', request, response, code, msg, hdrs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 475, in error
    return self._call_chain(*args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 558, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
@zhangxulong
Copy link
Author

@zhangxulong zhangxulong commented Aug 9, 2017

@yan12125

youtube-dl -v --print-traffic "https://www.youtube.com/watch?v=BaW_jenozKc"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'--print-traffic', u'https://www.youtube.com/watch?v=BaW_jenozKc']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.08.06
[debug] Python version 2.7.12 - Linux-4.10.0-27-generic-x86_64-with-Ubuntu-16.04-xenial
[debug] exe versions: ffmpeg 2.8.11-0ubuntu0.16.04.1, ffprobe 2.8.11-0ubuntu0.16.04.1, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] BaW_jenozKc: Downloading webpage
send: u'GET /watch?v=BaW_jenozKc&gl=US&hl=en&has_verified=1&bpctr=9999999999 HTTP/1.1\r\nAccept-Language: en-us,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\nConnection: close\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8\r\nUser-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/47.0 (Chrome)\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,;q=0.7\r\nHost: www.youtube.com\r\nCookie: PREF=f1=50000000&hl=en\r\n\r\n'
reply: 'HTTP/1.1 302 Found\r\n'
header: Location: https://ipv6.google.com/sorry/index?continue=https://www.youtube.com/watch%3Fv%3DBaW_jenozKc%26gl%3DUS%26hl%3Den%26has_verified%3D1%26bpctr%3D9999999999&hl=en&q=EhAgAQ2ogAEgZVIFBIUq8RE-GJasq8wFIhkA8aeDS5Qg0U8RpyvchWg2C153Y7Gvj6e9MgNyY24
header: Date: Wed, 09 Aug 2017 09:29:58 GMT
header: Pragma: no-cache
header: Expires: Fri, 01 Jan 1990 00:00:00 GMT
header: Cache-Control: no-store, no-cache, must-revalidate
header: Content-Type: text/html; charset=UTF-8
header: Server: HTTP server (unknown)
header: Content-Length: 441
header: X-XSS-Protection: 1; mode=block
header: X-Frame-Options: SAMEORIGIN
header: Alt-Svc: quic=":443"; ma=2592000; v="39,38,37,36,35"
header: Connection: close
send: u'GET /sorry/index?continue=https://www.youtube.com/watch%3Fv%3DBaW_jenozKc%26gl%3DUS%26hl%3Den%26has_verified%3D1%26bpctr%3D9999999999&hl=en&q=EhAgAQ2ogAEgZVIFBIUq8RE-GJasq8wFIhkA8aeDS5Qg0U8RpyvchWg2C153Y7Gvj6e9MgNyY24 HTTP/1.1\r\nAccept-Language: en-us,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\nConnection: close\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,
/;q=0.8\r\nUser-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/47.0 (Chrome)\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,;q=0.7\r\nHost: ipv6.google.com\r\n\r\n'
reply: 'HTTP/1.1 503 Service Unavailable\r\n'
header: Date: Wed, 09 Aug 2017 09:29:59 GMT
header: Pragma: no-cache
header: Expires: Fri, 01 Jan 1990 00:00:00 GMT
header: Cache-Control: no-store, no-cache, must-revalidate
header: Content-Type: text/html
header: Server: HTTP server (unknown)
header: Content-Length: 3327
header: X-XSS-Protection: 1; mode=block
header: X-Frame-Options: SAMEORIGIN
header: Alt-Svc: quic=":443"; ma=2592000; v="39,38,37,36,35"
header: Connection: close
ERROR: Unable to download webpage: HTTP Error 503: Service Unavailable (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 502, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2166, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/usr/lib/python2.7/urllib2.py", line 435, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 467, in error
result = self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 654, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/usr/lib/python2.7/urllib2.py", line 435, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 473, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Aug 9, 2017

I noticed that both @zhangxulong and @RenzHoly uses Chinese name on Github profiles. Are you connecting to YouTube from within Mainland China? Did you use any anti-censorship softwares? (proxies, VPNs, or "翻墙", "科学上网" in Chinese)

ping @junmuzi

@RenzHoly
Copy link

@RenzHoly RenzHoly commented Aug 9, 2017

@yan12125 I connect to YouTube using a VPN in HongKong, from Mainland China.

@junmuzi
Copy link

@junmuzi junmuzi commented Aug 9, 2017

Hi @yan12125,

Yes, I am connecting to YouTube from within Mainland China, but I just use IPv6 to visit YouTube and do not use any proxies or VPN.

When use chrome browse visit this url, sometime it will give tips to make sure you are not a robot. Seems youtube-dl could automatically click "I am not a robot" is ok.

# curl -v -L -6 "https://www.youtube.com/watch?v=5qVK7GIZ394"
...
Our systems have detected unusual traffic from your computer network. This page checks to see if it's really you sending the requests, and not a robot. Why did this happen?
...

@zhangxulong
Copy link
Author

@zhangxulong zhangxulong commented Aug 9, 2017

@yan12125 I am using IPv6 visit youtube. without any vpns.

@zhangxulong
Copy link
Author

@zhangxulong zhangxulong commented Aug 9, 2017

@junmuzi yes I have met the same condition with you

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Aug 9, 2017

Hmm I guess some people are abusing IPv6 networks in China to connect to YouTube. A possible workaround is exporting cookies to a file and feed it to youtube-dl via --cookies.

There were similar issues on other websites and some Github users gave useful tips. See #11572 (comment)

Seems youtube-dl could automatically click "I am not a robot" is ok.

It's infeasible. youtube-dl is essentially a robot, and it's a bug for Google if youtube-dl can click it automatically.

@junmuzi
Copy link

@junmuzi junmuzi commented Aug 9, 2017

Hi @yan12125 , @zhangxulong,

I double-check this issue, as I have use google to resolve the youtube IPv6 addr, and google will check whether this visit is an unusual traffic. As follow url show.

https://ipv6.google.com/sorry/index?continue=https://www.youtube.com/watch%3Fv%3DHZXhlKDKfVU%26spfreload%3D10&q=EhAgAQ2oAgMyAW4LhP_-ClGvGPmwrMwFIhkA8aeDS8eFzdO4lU37aL11CVcYQ5V6xGEPMgNyY24

So this issue do not due to youtube website, it is just due to the google dns resolve(as I have modify my hosts file in my computer).

Modify hosts:
#ping6 www.youtube.com
PING www.youtube.com(encrypted-tbn0.google.com) 56 data bytes
64 bytes from encrypted-tbn0.google.com: icmp_seq=1 ttl=41 time=66.3 ms
64 bytes from encrypted-tbn0.google.com: icmp_seq=2 ttl=41 time=66.4 ms

Before modify hosts:
# ping6 www.youtube.com
PING www.youtube.com(2001::8079:9264) 56 data bytes

As above show, I think we could close this issue(@yan12125). This is due to we use google dns to resolve youtube, and google will check whether this visit is a robot or not(@zhangxulong).

@zhangxulong
Copy link
Author

@zhangxulong zhangxulong commented Aug 9, 2017

@junmuzi modify the dns can resovle this problem?

@junmuzi
Copy link

@junmuzi junmuzi commented Aug 9, 2017

@zhangxulong , I think so. But you should find the avail dns server(This is also the IPv6 proxy, I think).

Currently, I use encrypted-tbn0.google.com as IPv6 proxy via hosts, but this will check whether a robot or not.

@junmuzi
Copy link

@junmuzi junmuzi commented Aug 10, 2017

@zhangxulong , you could stop download, and wait for 10 hours, it will resume, it just temporal block.

@zhangxulong
Copy link
Author

@zhangxulong zhangxulong commented Aug 10, 2017

@junmuzi I have two server , and it all blocked by the robot verification. and I had used encrypted-tbn0.google.com as IPv6 proxy via hosts. you can down load directly by youtube-dl now?

@cutrain
Copy link

@cutrain cutrain commented Aug 10, 2017

Same condition. And I can't download after waiting for over 12 hours.

@RenzHoly
Copy link

@RenzHoly RenzHoly commented Aug 10, 2017

I'm able to download with another VPN

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Aug 10, 2017

Mapping www.youtube.com to encrypted-tbn0.google.com sounds a misconfiguration for me. If I under it correctly, hosts is used to map domain names to IP addresses. Maybe mapping from www.youtube.com directly to 2404:6800:4008:802::200e (an IPv6 address for encrypted-tbn0.google.com) will work?

@zhangxulong
Copy link
Author

@zhangxulong zhangxulong commented Aug 11, 2017

I am using the IPV6 dns 2001:470:20::2
and I use it for a long time, when ping youtube.com it display (encrypted-tbn0.google.com) 56 data bytes, but it cannot help this problem any way.
without the youtube-dl , I can just the webpage for download now, and the speed is very low just about 1Mb/s. if youtube-dl can be used, the download speed could be 10MB/s. So I wish this problem could be resloved.

@zhangxulong
Copy link
Author

@zhangxulong zhangxulong commented Aug 11, 2017

oh , it is normal now without any exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.