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

Youtube-dl installed via pip gets error: "unable to download video info webpage: " #9996

Closed
pc-magas opened this issue Jul 3, 2016 · 9 comments
Closed

Comments

@pc-magas
Copy link

@pc-magas pc-magas commented Jul 3, 2016

I tries to download this video with -x parameter for extracting the sound only and I get these errors:

 youtube-dl -x  https://www.youtube.com/watch?v=fxfNOVZh4B4 --verbose
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-x', u'https://www.youtube.com/watch?v=fxfNOVZh4B4', u'--verbose']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.07.03.1
[debug] Python version 2.7.11+ - Linux-4.4.0-28-generic-x86_64-with-Ubuntu-16.04-xenial
[debug] exe versions: ffmpeg 2.8.6-1ubuntu2, ffprobe 2.8.6-1ubuntu2, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] fxfNOVZh4B4: Downloading webpage
[youtube] fxfNOVZh4B4: Downloading video info webpage
ERROR: unable to download video info webpage: <urlopen error EOF occurred in violation of protocol (_ssl.c:590)> (caused by URLError(SSLEOFError(8, u'EOF occurred in violation of protocol (_ssl.c:590)'),))
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 390, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 1950, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python2.7/urllib2.py", line 429, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 447, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/utils.py", line 994, in https_open
    req, **kwargs)
  File "/usr/lib/python2.7/urllib2.py", line 1198, in do_open
    raise URLError(err)

[x] I think is a good Idea to have nicer looking message even in verbose mode.
[x] Does this happen because there's not installed avconv or ffmpeg? Or is some sort of other code bug?

The version I am running is: 2016.07.03.1 in an Ubuntu 16.04 machine.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jul 3, 2016

Post the output of curl -v https://www.youtube.com/watch?v=fxfNOVZh4B4.

@pc-magas
Copy link
Author

@pc-magas pc-magas commented Jul 3, 2016

Execution code with curl headers and response redirected to a txt file:

pcmagas@pcmagas-Lenovo-G70-70:~$ curl -v https://www.youtube.com/watch?v=fxfNOVZh4B4  > hello.txt 1> errors.txt
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 195.14.151.52...
* Connected to www.youtube.com (195.14.151.52) port 443 (#0)
* found 173 certificates in /etc/ssl/certs/ca-certificates.crt
* found 697 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_ECDSA_AES_128_GCM_SHA256
*    server certificate verification OK
*    server certificate status verification SKIPPED
*    common name: *.google.com (matched)
*    server certificate expiration date OK
*    server certificate activation date OK
*    certificate public key: EC
*    certificate version: #3
*    subject: C=US,ST=California,L=Mountain View,O=Google Inc,CN=*.google.com
*    start date: Thu, 23 Jun 2016 08:33:56 GMT
*    expire date: Thu, 15 Sep 2016 08:31:00 GMT
*    issuer: C=US,O=Google Inc,CN=Google Internet Authority G2
*    compression: NULL
* ALPN, server accepted to use http/1.1
> GET /watch?v=fxfNOVZh4B4 HTTP/1.1
> Host: www.youtube.com
> User-Agent: curl/7.47.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< X-Frame-Options: SAMEORIGIN
< Strict-Transport-Security: max-age=31536000
< X-Content-Type-Options: nosniff
< Expires: Tue, 27 Apr 1971 19:44:06 EST
< P3P: CP="This is not a P3P policy! See http://support.google.com/accounts/answer/151657?hl=en for more info."
< X-XSS-Protection: 1; mode=block; report=https://www.google.com/appserve/security-bugs/log/youtube
< Cache-Control: no-cache
< Content-Type: text/html; charset=utf-8
< Date: Sun, 03 Jul 2016 16:39:21 GMT
< Server: YouTubeFrontEnd
< Set-Cookie: YSC=Yt_ZvG1uWeA; path=/; domain=.youtube.com; httponly
< Set-Cookie: VISITOR_INFO1_LIVE=QbuFZgV-Aqk; path=/; domain=.youtube.com; expires=Sat, 04-Mar-2017 04:32:21 GMT; httponly
< Alternate-Protocol: 443:quic
< Alt-Svc: quic=":443"; ma=2592000; v="35,34,33,32,31,30,29,28,27,26,25"
< Accept-Ranges: none
< Vary: Accept-Encoding
< Transfer-Encoding: chunked
< 

The html response is this file (as txt just rename it as .html file)
hello.txt

@pc-magas
Copy link
Author

@pc-magas pc-magas commented Jul 3, 2016

I also I do not know if it affects the result I used the guake terminal emulator. and the command I executed was:
youtube-dl -x https://www.youtube.com/watch?v=fxfNOVZh4B4 --verbose

I mentioned above the comand just to make it more clear and to be abble with just a copy paste t execute it.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jul 3, 2016

Post the output of curl -v 'https://www.youtube.com/get_video_info?&video_id=fxfNOVZh4B4&e l=info&ps=default&eurl=&gl=US&hl=en' and youtube-dl -v --print-traffic fxfNOVZh4B4.

@pc-magas
Copy link
Author

@pc-magas pc-magas commented Jul 3, 2016

Curl command

curl -v 'https://www.youtube.com/get_video_info?&video_id=fxfNOVZh4B4&e l=info&ps=default&eurl=&gl=US&hl=en'
*   Trying 195.14.151.31...
* Connected to www.youtube.com (195.14.151.31) port 443 (#0)
* found 173 certificates in /etc/ssl/certs/ca-certificates.crt
* found 697 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_ECDSA_AES_128_GCM_SHA256
*    server certificate verification OK
*    server certificate status verification SKIPPED
*    common name: *.google.com (matched)
*    server certificate expiration date OK
*    server certificate activation date OK
*    certificate public key: EC
*    certificate version: #3
*    subject: C=US,ST=California,L=Mountain View,O=Google Inc,CN=*.google.com
*    start date: Thu, 23 Jun 2016 08:33:56 GMT
*    expire date: Thu, 15 Sep 2016 08:31:00 GMT
*    issuer: C=US,O=Google Inc,CN=Google Internet Authority G2
*    compression: NULL
* ALPN, server accepted to use http/1.1
> GET /get_video_info?&video_id=fxfNOVZh4B4&e l=info&ps=default&eurl=&gl=US&hl=en HTTP/1.1
> Host: www.youtube.com
> User-Agent: curl/7.47.0
> Accept: */*
> 
* HTTP 1.0, assume close after body
< HTTP/1.0 400 Bad Request
< Content-Type: text/html; charset=UTF-8
< Content-Length: 1555
< Date: Sun, 03 Jul 2016 18:40:45 GMT
< 
<!DOCTYPE html>
<html lang=en>
  <meta charset=utf-8>
  <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
  <title>Error 400 (Bad Request)!!1</title>
  <style>
    *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
  </style>
  <a href=//www.google.com/><span id=logo aria-label=Google></span></a>
  <p><b>400.</b> <ins>That’s an error.</ins>
  <p>Your client has issued a malformed or illegal request.  <ins>That’s all we know.</ins>
* Closing connection 0


And youtube-dl one


youtube-dl -v --print-traffic fxfNOVZh4B4 > message.txt
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'--print-traffic', u'fxfNOVZh4B4']
[debug] Encodings: locale UTF-8, fs UTF-8, out None, pref UTF-8
[debug] youtube-dl version 2016.07.03.1
[debug] Python version 2.7.11+ - Linux-4.4.0-28-generic-x86_64-with-Ubuntu-16.04-xenial
[debug] exe versions: ffmpeg 2.8.6-1ubuntu2, ffprobe 2.8.6-1ubuntu2, rtmpdump 2.4
[debug] Proxy map: {}
WARNING: Requested formats are incompatible for merge and will be merged into mkv.

For youtube-dl command I attach some of the output into a file:
message.txt

Also I neeed to mention that without the -x parameter worked fine. Perhaps has issues when the internet is down. (A posssible problem)

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jul 3, 2016

So does it work now? According to message.txt it does.

@pc-magas
Copy link
Author

@pc-magas pc-magas commented Jul 4, 2016

Yes it works.
Perhaps was internet's connection issue.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jan 30, 2018

Closing as solved.

@yan12125 yan12125 closed this Jan 30, 2018
@pc-magas
Copy link
Author

@pc-magas pc-magas commented Jan 30, 2018

I think in this case would be better if a suitable message has been shown instead of all this error messages. It would be more clear for everyone using the youtube-dl.

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
3 participants
You can’t perform that action at this time.