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: unable to download video #821

Closed
silverhammermba opened this issue May 4, 2013 · 8 comments
Closed

Youtube: unable to download video #821

silverhammermba opened this issue May 4, 2013 · 8 comments

Comments

@silverhammermba
Copy link

@silverhammermba silverhammermba commented May 4, 2013

It hangs at "Extracting video information" and after a few minutes exits after displaying "ERROR: unable to download video". It definitely worked just a few days ago. Perhaps youtube changed something?

@phihag
Copy link
Contributor

@phihag phihag commented May 4, 2013

Mmm, everything is working fine for me, even from the US. Can you reproduce this issue from multiple ISPs? Also, it would be very helpful to have the full output of youtube-dl, with the -v flag. Can you post that?

@nickleefly
Copy link

@nickleefly nickleefly commented May 4, 2013

I tried on windows7 64bit and ubuntu 12.04 32bit, I can open youtube video from chrome.
But when i tried to download using youtube-dl -t url, it hangs there
youtube-dl -v output is

nick at www ~/Downloads/youtube $ youtube-dl -v
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v']
[debug] youtube-dl version 2013.05.04
[debug] Python version 2.7.3 - Linux-3.8.2-030802-generic-i686-with-Ubuntu-12.10-quantal
[debug] Proxy map: {}
Usage: youtube-dl [options] url [url...]

youtube-dl: error: you must provide at least one URL

$ youtube-dl -t https://www.youtube.com/watch?v=MWH-_nJgebw
[youtube] Setting language
WARNING: unable to set language: <urlopen error [Errno 110] Connection timed out>
[youtube] MWH-_nJgebw: Downloading video webpage
ERROR: unable to download video webpage: <urlopen error [Errno 101] Network is unreachable>

BTW I am using vpn proxy, I have to use it.

@phihag
Copy link
Contributor

@phihag phihag commented May 4, 2013

@nickleefly I'm pretty sure your issue is unrelated, note the different error messages - @silverhammermba can download the youtube page just fine, but your download fails even there.

@nickleefly
Copy link

@nickleefly nickleefly commented May 4, 2013

@phihag I guess. the error of mine is because of I am using vpn, I tried on both of my windows7 and ubuntu 12.04 machine, not sure

@silverhammermba
Copy link
Author

@silverhammermba silverhammermba commented May 4, 2013

I am using a different ISP than usual, but it definitely worked with this ISP a few weeks ago.

Here's the verbose output.

[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-tv', 'http://www.youtube.com/watch?v=LdTzRIOR-sY']
[debug] youtube-dl version 2013.05.01
[debug] Python version 3.3.1 - Linux-3.8.10-1-ARCH-x86_64-with-arch
[debug] Proxy map: {}
[youtube] Setting language
[youtube] LdTzRIOR-sY: Downloading video webpage
[youtube] LdTzRIOR-sY: Downloading video info webpage
[youtube] LdTzRIOR-sY: Extracting video information
 ERROR: unable to download video
Traceback (most recent call last):
  File "/usr/lib/python3.3/urllib/request.py", line 1252, in do_open
    h.request(req.get_method(), req.selector, req.data, headers)
  File "/usr/lib/python3.3/http/client.py", line 1061, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python3.3/http/client.py", line 1099, in _send_request
    self.endheaders(body)
  File "/usr/lib/python3.3/http/client.py", line 1057, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python3.3/http/client.py", line 902, in _send_output
    self.send(msg)
  File "/usr/lib/python3.3/http/client.py", line 840, in send
    self.connect()
  File "/usr/lib/python3.3/http/client.py", line 818, in connect
    self.timeout, self.source_address)
  File "/usr/lib/python3.3/socket.py", line 435, in create_connection
    raise err
  File "/usr/lib/python3.3/socket.py", line 426, in create_connection
    sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/FileDownloader.py", line 682, in process_info
    success = self._do_download(filename, info_dict)
  File "/usr/local/bin/youtube-dl/youtube_dl/FileDownloader.py", line 852, in _do_download
    data = compat_urllib_request.urlopen(request)
  File "/usr/lib/python3.3/urllib/request.py", line 160, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.3/urllib/request.py", line 473, in open
    response = self._open(req, data)
  File "/usr/lib/python3.3/urllib/request.py", line 491, in _open
    '_open', req)
  File "/usr/lib/python3.3/urllib/request.py", line 451, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.3/urllib/request.py", line 1272, in http_open
    return self.do_open(http.client.HTTPConnection, req)
  File "/usr/lib/python3.3/urllib/request.py", line 1255, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 110] Connection timed out>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/FileDownloader.py", line 707, in download
    videos = self.extract_info(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/FileDownloader.py", line 477, in extract_info
    results.append(self.process_ie_result(ie_result, download))
  File "/usr/local/bin/youtube-dl/youtube_dl/FileDownloader.py", line 507, in process_ie_result
    self.process_info(ie_result)
  File "/usr/local/bin/youtube-dl/youtube_dl/FileDownloader.py", line 684, in process_info
    raise UnavailableVideoError()
youtube_dl.utils.UnavailableVideoError
@phihag
Copy link
Contributor

@phihag phihag commented May 4, 2013

This is a network issue, unrelated to youtube-dl - when youtube-dl tries to contact the actual server (you can get it with --get-url). Most likely, this is either an outage of youtube (in which case it should be temporary), or a problem with a firewall of some kind. Can you provide a pcap dump? Can you ping the server you get with --get-url? If I'm right, using a different connection should fix the problem. Try

youtube-dl LdTzRIOR-sY --proxy ytdl-proxy.phihag.de:3128
@silverhammermba
Copy link
Author

@silverhammermba silverhammermba commented May 4, 2013

Indeed! Using the proxy worked.

@phihag
Copy link
Contributor

@phihag phihag commented May 4, 2013

Great, so you can wait for youtube to fix their issues, or contact your ISP to finally resolve this. I'm closing this issue now, but feel free to comment if there's anything thatyoutube-dl could do to improve the situation.

@phihag phihag closed this May 4, 2013
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.