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 does not work on wifi? #16414

Closed
ghost opened this issue May 9, 2018 · 8 comments
Closed

youtube-dl does not work on wifi? #16414

ghost opened this issue May 9, 2018 · 8 comments
Labels

Comments

@ghost
Copy link

@ghost ghost commented May 9, 2018

This is on a rooted Android 5.1 device with Termux, python 3.6.5 and youtube-dl installed via pip.

When I use youtube-dl with mobile data, it works pretty good. But instead if I use wifi, then it gets stuck after this step Downloading webpage, it takes about 5 minutes to print the next message, then again a few more minutes to the next message and so on.

The url I am trying is a vimeo playlist.
Apart from that I have also tried coursera-dl and edx-dl which IIRC uses youtube-dl internally.

The last message I received on -v before it became slow again was -

Checking Original video URL

Also this happens only on the video urls.
Pdf downloads work fine.

Is there anything that I can do to debug it more?
Or any general reason that could cause the issue?

I am able to browse internet on the wifi just fine.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented May 9, 2018

Most likely unstable connection is the reason.

@dstftw dstftw closed this May 9, 2018
@dstftw dstftw added the incomplete label May 9, 2018
@ghost
Copy link
Author

@ghost ghost commented May 9, 2018

No that is not the problem, I can very well download other stuff using the browser or ADM.
It gets stuck at the exact same place always.

@ghost
Copy link
Author

@ghost ghost commented May 9, 2018

@dstftw

ERROR: Unable to download webpage: <urlopen error [Errno 113] No route to host> (caused by URLError(OSError(113, 'No route to host'),))
  File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/youtube_dl/extractor/common.py", line 519, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/youtube_dl/YoutubeDL.py", line 2203, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/data/data/com.termux/files/usr/lib/python3.6/urllib/request.py", line 526, in open
    response = self._open(req, data)
  File "/data/data/com.termux/files/usr/lib/python3.6/urllib/request.py", line 544, in _open
    '_open', req)
  File "/data/data/com.termux/files/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/youtube_dl/utils.py", line 1101, in https_open
    req, **kwargs)
  File "/data/data/com.termux/files/usr/lib/python3.6/urllib/request.py", line 1320, in do_open
    raise URLError(err)

After letting the program run for about 10-15 minutes I got this error.

@ghost
Copy link
Author

@ghost ghost commented May 9, 2018

But I got this error only once, i.e. right now. Whereas I am trying to use this on wifi since 2-3 days and on all those tries, it does move ahead but very very slowly.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented May 9, 2018

[Errno 113] No route to host

Clearly states an issue with your network connection at that particular time to that particular host. 10 minutes wait is due to default socket timeout of 600 seconds that is tuned with --socket-timeout.

@ghost
Copy link
Author

@ghost ghost commented May 9, 2018

Definitely not a problem with the network as I am able to access the same url from the browser and download the video using IDM.

Also the issue occurs always at the exact same place and I am able to download pdfs and extra stuff.

@ghost
Copy link
Author

@ghost ghost commented May 9, 2018

It starts working on vpn. Unfortunately that won't work with my work wifi.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented May 9, 2018

Once again: it's clearly an intermittent network issue as described in previous comment.

@ytdl-org ytdl-org locked as resolved and limited conversation to collaborators May 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.