Unable to download webpage #5089

Closed
opened 2026-02-21 02:33:58 -05:00 by deekerman · 9 comments
Owner

Originally created by @mahdiG on GitHub (Jul 17, 2015).

I used to download from youtube but it gives me errors now. I have python3.4.3+ but it seems youtube-dl uses python 2.7.10.

mahdi@JackJack:~$ youtube-dl --verbose -F https://www.youtube.com/watch?v=XxWU-09R1SM
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--verbose', u'-F', u'https://www.youtube.com/watch?v=XxWU-09R1SM']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.07.07
[debug] Python version 2.7.10 - Linux-4.0.0-2-amd64-x86_64-with-debian-stretch-sid
[debug] exe versions: none
[debug] Proxy map: {}
[youtube] XxWU-09R1SM: Downloading webpage
ERROR: Unable to download webpage: <urlopen error [Errno 104] Connection reset by peer> (caused by URLError(error(104, 'Connection reset by peer'),))
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 312, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1729, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/usr/lib/python2.7/urllib2.py", line 431, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 449, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(_args)
File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 717, in https_open
req, *_kwargs)
File "/usr/lib/python2.7/urllib2.py", line 1197, in do_open
raise URLError(err)

Originally created by @mahdiG on GitHub (Jul 17, 2015). I used to download from youtube but it gives me errors now. I have python3.4.3+ but it seems youtube-dl uses python 2.7.10. mahdi@JackJack:~$ youtube-dl --verbose -F https://www.youtube.com/watch?v=XxWU-09R1SM [debug] System config: [] [debug] User config: [] [debug] Command-line args: [u'--verbose', u'-F', u'https://www.youtube.com/watch?v=XxWU-09R1SM'] [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2015.07.07 [debug] Python version 2.7.10 - Linux-4.0.0-2-amd64-x86_64-with-debian-stretch-sid [debug] exe versions: none [debug] Proxy map: {} [youtube] XxWU-09R1SM: Downloading webpage ERROR: Unable to download webpage: <urlopen error [Errno 104] Connection reset by peer> (caused by URLError(error(104, 'Connection reset by peer'),)) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 312, in _request_webpage return self._downloader.urlopen(url_or_request) File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1729, in urlopen return self._opener.open(req, timeout=self._socket_timeout) File "/usr/lib/python2.7/urllib2.py", line 431, in open response = self._open(req, data) File "/usr/lib/python2.7/urllib2.py", line 449, in _open '_open', req) File "/usr/lib/python2.7/urllib2.py", line 409, in _call_chain result = func(_args) File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 717, in https_open req, *_kwargs) File "/usr/lib/python2.7/urllib2.py", line 1197, in do_open raise URLError(err)
Author
Owner

@yan12125 commented on GitHub (Jul 17, 2015):

Can you watch the video in browsers directly?

@yan12125 commented on GitHub (Jul 17, 2015): Can you watch the video in browsers directly?
Author
Owner

@mahdiG commented on GitHub (Jul 17, 2015):

Not without a proxy and I've tried setting up a proxy for youtube-dl too and it doesn't work. But my brother who uses the same ISP can download youtube videos even without proxy. I could do it before too but now I can't.

@mahdiG commented on GitHub (Jul 17, 2015): Not without a proxy and I've tried setting up a proxy for youtube-dl too and it doesn't work. But my brother who uses the same ISP can download youtube videos even without proxy. I could do it before too but now I can't.
Author
Owner

@mahdiG commented on GitHub (Jul 17, 2015):

Sometimes I get an error different from the first one.

mahdi@JackJack:~$ youtube-dl --verbose -F https://www.youtube.com/watch?v=Ss39UktpXk0
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--verbose', u'-F', u'https://www.youtube.com/watch?v=Ss39UktpXk0']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.07.07
[debug] Python version 2.7.10 - Linux-4.0.0-2-amd64-x86_64-with-debian-stretch-sid
[debug] exe versions: none
[debug] Proxy map: {}
[youtube] Ss39UktpXk0: Downloading webpage
ERROR: Unable to download webpage: <urlopen error [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:590)> (caused by URLError(SSLError(1, u'[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:590)'),))
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 312, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1729, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/usr/lib/python2.7/urllib2.py", line 431, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 449, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(_args)
File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 717, in https_open
req, *_kwargs)
File "/usr/lib/python2.7/urllib2.py", line 1197, in do_open
raise URLError(err)

@mahdiG commented on GitHub (Jul 17, 2015): Sometimes I get an error different from the first one. mahdi@JackJack:~$ youtube-dl --verbose -F https://www.youtube.com/watch?v=Ss39UktpXk0 [debug] System config: [] [debug] User config: [] [debug] Command-line args: [u'--verbose', u'-F', u'https://www.youtube.com/watch?v=Ss39UktpXk0'] [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2015.07.07 [debug] Python version 2.7.10 - Linux-4.0.0-2-amd64-x86_64-with-debian-stretch-sid [debug] exe versions: none [debug] Proxy map: {} [youtube] Ss39UktpXk0: Downloading webpage ERROR: Unable to download webpage: <urlopen error [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:590)> (caused by URLError(SSLError(1, u'[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:590)'),)) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 312, in _request_webpage return self._downloader.urlopen(url_or_request) File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1729, in urlopen return self._opener.open(req, timeout=self._socket_timeout) File "/usr/lib/python2.7/urllib2.py", line 431, in open response = self._open(req, data) File "/usr/lib/python2.7/urllib2.py", line 449, in _open '_open', req) File "/usr/lib/python2.7/urllib2.py", line 409, in _call_chain result = func(_args) File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 717, in https_open req, *_kwargs) File "/usr/lib/python2.7/urllib2.py", line 1197, in do_open raise URLError(err)
Author
Owner

@yan12125 commented on GitHub (Jul 18, 2015):

What's the error message when using a proxy with youtube-dl?

@yan12125 commented on GitHub (Jul 18, 2015): What's the error message when using a proxy with youtube-dl?
Author
Owner

@mahdiG commented on GitHub (Jul 21, 2015):

After reading http://unix.stackexchange.com/questions/71481/use-socks-proxy-for-commands-in-terminal I used this command:

export http_proxy=socks5://127.0.0.1:8080 https_proxy=socks5://127.0.0.1:8080

And then:

mahdi@JackJack:~$ youtube-dl --verbose --proxy 127.0.0.1:1080 -F https://www.youtube.com/watch?v=JG9c3uF8NbY
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--verbose', u'--proxy', u'127.0.0.1:1080', u'-F', u'https://www.youtube.com/watch?v=JG9c3uF8NbY']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.07.18
[debug] Python version 2.7.10 - Linux-4.0.0-2-amd64-x86_64-with-debian-stretch-sid
[debug] exe versions: none
[debug] Proxy map: {u'http': u'127.0.0.1:1080', u'https': u'127.0.0.1:1080'}
[youtube] JG9c3uF8NbY: Downloading webpage
ERROR: Unable to download webpage: '' (caused by BadStatusLine("''",)); 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 314, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1731, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/usr/lib/python2.7/urllib2.py", line 431, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 449, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(_args)
File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 717, in https_open
req, *_kwargs)
File "/usr/lib/python2.7/urllib2.py", line 1194, in do_open
h.request(req.get_method(), req.get_selector(), req.data, headers)
File "/usr/lib/python2.7/httplib.py", line 1052, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python2.7/httplib.py", line 1092, in _send_request
self.endheaders(body)
File "/usr/lib/python2.7/httplib.py", line 1048, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 892, in _send_output
self.send(msg)
File "/usr/lib/python2.7/httplib.py", line 854, in send
self.connect()
File "/usr/lib/python2.7/httplib.py", line 1265, in connect
HTTPConnection.connect(self)
File "/usr/lib/python2.7/httplib.py", line 834, in connect
self._tunnel()
File "/usr/lib/python2.7/httplib.py", line 811, in _tunnel
(version, code, message) = response._read_status()
File "/usr/lib/python2.7/httplib.py", line 417, in _read_status
raise BadStatusLine(line)

@mahdiG commented on GitHub (Jul 21, 2015): After reading http://unix.stackexchange.com/questions/71481/use-socks-proxy-for-commands-in-terminal I used this command: export http_proxy=socks5://127.0.0.1:8080 https_proxy=socks5://127.0.0.1:8080 And then: mahdi@JackJack:~$ youtube-dl --verbose --proxy 127.0.0.1:1080 -F https://www.youtube.com/watch?v=JG9c3uF8NbY [debug] System config: [] [debug] User config: [] [debug] Command-line args: [u'--verbose', u'--proxy', u'127.0.0.1:1080', u'-F', u'https://www.youtube.com/watch?v=JG9c3uF8NbY'] [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2015.07.18 [debug] Python version 2.7.10 - Linux-4.0.0-2-amd64-x86_64-with-debian-stretch-sid [debug] exe versions: none [debug] Proxy map: {u'http': u'127.0.0.1:1080', u'https': u'127.0.0.1:1080'} [youtube] JG9c3uF8NbY: Downloading webpage ERROR: Unable to download webpage: '' (caused by BadStatusLine("''",)); 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 314, in _request_webpage return self._downloader.urlopen(url_or_request) File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1731, in urlopen return self._opener.open(req, timeout=self._socket_timeout) File "/usr/lib/python2.7/urllib2.py", line 431, in open response = self._open(req, data) File "/usr/lib/python2.7/urllib2.py", line 449, in _open '_open', req) File "/usr/lib/python2.7/urllib2.py", line 409, in _call_chain result = func(_args) File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 717, in https_open req, *_kwargs) File "/usr/lib/python2.7/urllib2.py", line 1194, in do_open h.request(req.get_method(), req.get_selector(), req.data, headers) File "/usr/lib/python2.7/httplib.py", line 1052, in request self._send_request(method, url, body, headers) File "/usr/lib/python2.7/httplib.py", line 1092, in _send_request self.endheaders(body) File "/usr/lib/python2.7/httplib.py", line 1048, in endheaders self._send_output(message_body) File "/usr/lib/python2.7/httplib.py", line 892, in _send_output self.send(msg) File "/usr/lib/python2.7/httplib.py", line 854, in send self.connect() File "/usr/lib/python2.7/httplib.py", line 1265, in connect HTTPConnection.connect(self) File "/usr/lib/python2.7/httplib.py", line 834, in connect self._tunnel() File "/usr/lib/python2.7/httplib.py", line 811, in _tunnel (version, code, message) = response._read_status() File "/usr/lib/python2.7/httplib.py", line 417, in _read_status raise BadStatusLine(line)
Author
Owner

@yan12125 commented on GitHub (Jul 21, 2015):

socks5 proxies are not supported yet. See #402.

@yan12125 commented on GitHub (Jul 21, 2015): socks5 proxies are not supported yet. See #402.
Author
Owner

@mahdiG commented on GitHub (Jul 21, 2015):

I know :-/ that's why I googled it. I use a SSH connection. But my point is, I used to download videos without any proxy as my brother does right now

@mahdiG commented on GitHub (Jul 21, 2015): I know :-/ that's why I googled it. I use a SSH connection. But my point is, I used to download videos without any proxy as my brother does right now
Author
Owner

@yan12125 commented on GitHub (Jul 21, 2015):

Sorry if you can't watch the video in browsers, youtube-dl can't help more.

@yan12125 commented on GitHub (Jul 21, 2015): Sorry if you can't watch the video in browsers, youtube-dl can't help more.
Author
Owner

@mahdiG commented on GitHub (Oct 22, 2015):

I switched to Ubuntu 14.04 and now it works, despite being unable watch the videos in youtube.com

@mahdiG commented on GitHub (Oct 22, 2015): I switched to Ubuntu 14.04 and now it works, despite being unable watch the videos in youtube.com
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl-ytdl-org#5089
No description provided.