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 with proxy over socks5 #11355

Closed
p-m opened this issue Dec 3, 2016 · 3 comments
Closed

error with proxy over socks5 #11355

p-m opened this issue Dec 3, 2016 · 3 comments
Labels
bug

Comments

@p-m
Copy link

@p-m p-m commented Dec 3, 2016

  • [x ] I've verified and I assure that I'm running youtube-dl 2016.12.01
  • [x ] At least skimmed through README and most notably FAQ and BUGS sections
  • [ x] Searched the bugtracker for similar issues including closed ones
  • [x ] Bug report (encountered problems with youtube-dl)

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:

$ youtube-dl -v --proxy socks5://127.0.0.1:9050/ http://www.spiegel.tv/filme/bbc-gefaehrliche-strassen-sibirien/
[debug] System config: []
[debug] User config: [u'--restrict-filenames', u'--no-mtime', u'--no-part', u'-x', u'-k', u'--audio-format', u'mp3', u'--audio-quality', u'0']
[debug] Command-line args: [u'-v', u'--proxy', u'socks5://127.0.0.1:9050/', u'http://www.spiegel.tv/filme/bbc-gefaehrliche-strassen-sibirien/']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.12.01
[debug] Python version 2.7.12 - Linux-4.1.34-33-default-x86_64-with-SuSE-42.1-x86_64
[debug] exe versions: ffmpeg 3.0.2, ffprobe 3.0.2, rtmpdump 2.4
[debug] Proxy map: {u'http': u'socks5://127.0.0.1:9050/', u'https': u'socks5://127.0.0.1:9050/'}
[Spiegeltv] bbc-gefaehrliche-strassen-sibirien: Downloading webpage
[Spiegeltv] bbc-gefaehrliche-strassen-sibirien: Downloading version information
[Spiegeltv] bbc-gefaehrliche-strassen-sibirien: Downloading object information
[Spiegeltv] bbc-gefaehrliche-strassen-sibirien: Downloading media information
[Spiegeltv] bbc-gefaehrliche-strassen-sibirien: Downloading server information
[Spiegeltv] bbc-gefaehrliche-strassen-sibirien: Checking hls video format URL
[Spiegeltv] bbc-gefaehrliche-strassen-sibirien: Checking hls video format URL
Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/bin/youtube-dl/__main__.py", line 19, in <module>
  File "/usr/bin/youtube-dl/youtube_dl/__init__.py", line 444, in main
    
  File "/usr/bin/youtube-dl/youtube_dl/__init__.py", line 434, in _real_main
    
  File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1791, in download
  File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 694, in extract_info
  File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 357, in extract
  File "/usr/bin/youtube-dl/youtube_dl/extractor/spiegeltv.py", line 94, in _real_extract
  File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 1004, in _check_formats
  File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 1003, in <lambda>
  File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 1022, in _is_valid_url
  File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 404, in _request_webpage
  File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2001, in urlopen
  File "/usr/lib64/python2.7/urllib2.py", line 429, in open
    response = self._open(req, data)
  File "/usr/lib64/python2.7/urllib2.py", line 447, in _open
    '_open', req)
  File "/usr/lib64/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/bin/youtube-dl/youtube_dl/utils.py", line 872, in http_open
  File "/usr/lib64/python2.7/urllib2.py", line 1195, in do_open
    h.request(req.get_method(), req.get_selector(), req.data, headers)
  File "/usr/lib64/python2.7/httplib.py", line 1057, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib64/python2.7/httplib.py", line 1097, in _send_request
    self.endheaders(body)
  File "/usr/lib64/python2.7/httplib.py", line 1053, in endheaders
    self._send_output(message_body)
  File "/usr/lib64/python2.7/httplib.py", line 897, in _send_output
    self.send(msg)
  File "/usr/lib64/python2.7/httplib.py", line 859, in send
    self.connect()
  File "/usr/bin/youtube-dl/youtube_dl/utils.py", line 1002, in connect
  File "/usr/bin/youtube-dl/youtube_dl/socks.py", line 269, in connect
    def __negotiatesocks4(self,destaddr,destport):
  File "/usr/bin/youtube-dl/youtube_dl/socks.py", line 265, in _make_proxy
    machine (note: getproxypeername returns the proxy)
  File "/usr/bin/youtube-dl/youtube_dl/socks.py", line 240, in _setup_socks5
    else:
youtube_dl.socks.Socks5Error: [Errno 4] unknown error

Description of your issue, suggested solution and other information

Download over tor-proxy fails. No problem in Firefox.

TIA for any help, Peter

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Dec 3, 2016

Error 4 indicates "Host unreachable". There's a bug in youtube-dl that error messages are incorrect.

By the way, this looks a temporary error as previous requests through the same proxy are OK. Could you try again?

Update: 100% reproducible on my machine too

yan12125 added a commit that referenced this issue Dec 3, 2016
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Dec 3, 2016

Python 2 is broken while Python 3 is OK. Need more checking.

@yan12125 yan12125 added the bug label Dec 3, 2016
@yan12125 yan12125 closed this in 4bd7d9d Dec 4, 2016
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Dec 4, 2016

Thanks for the report. It will be fixed in the next version.

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