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

SOCKS proxy support stopped working #9558

Closed
OliverUv opened this issue May 21, 2016 · 2 comments
Closed

SOCKS proxy support stopped working #9558

OliverUv opened this issue May 21, 2016 · 2 comments

Comments

@OliverUv
Copy link

@OliverUv OliverUv commented May 21, 2016

  • [x ] I've verified and I assure that I'm running youtube-dl 2016.05.16

Before submitting an issue make sure you have:

  • [x ] At least skimmed through README and most notably FAQ and BUGS sections
  • [ x] Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • [x ] Bug report (encountered problems with youtube-dl)

~/video> youtube-dl -vF 'https://www.youtube.com/watch?v=0gAsdEUNUJY' --dump-pages > ~/t/ytdl_dump.txt
[debug] System config: []
[debug] User config: [u'--proxy', u'socks5://127.0.0.1:1080/']
[debug] Command-line args: [u'-vF', u'https://www.youtube.com/watch?v=0gAsdEUNUJY', u'--dump-pages']
[debug] Encodings: locale UTF-8, fs UTF-8, out None, pref UTF-8
[debug] youtube-dl version 2016.05.16
[debug] Python version 2.7.6 - Linux-3.16.0-38-generic-x86_64-with-LinuxMint-17.2-rafaela
[debug] exe versions: avconv 9.18-6, avprobe 9.18-6, rtmpdump 2.4
[debug] Proxy map: {u'http': u'socks5://127.0.0.1:1080/', u'https': u'socks5://127.0.0.1:1080/'}
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/__init__.py", line 421, in main
    _real_main(argv)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/__init__.py", line 411, in _real_main
    retcode = ydl.download(all_urls)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 1736, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 676, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 341, in extract
    return self._real_extract(url)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 1216, in _real_extract
    video_webpage = self._download_webpage(url, video_id)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 501, in _download_webpage
    res = self._download_webpage_handle(url_or_request, video_id, note, errnote, fatal, encoding=encoding, data=data, headers=headers, query=query)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 408, in _download_webpage_handle
    urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data, headers=headers, query=query)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 388, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 1946, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python2.7/urllib2.py", line 404, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 422, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/utils.py", line 929, in https_open
    conn_class = make_socks_conn_class(conn_class, socks_proxy)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/utils.py", line 890, in make_socks_conn_class
    compat_urllib_parse_unquote_plus(url_components.username),
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/compat.py", line 170, in compat_urllib_parse_unquote_plus
    string = string.replace('+', ' ')
AttributeError: 'NoneType' object has no attribute 'replace'

~/video> cat ~/t/ytdl_dump.txt
[youtube] 0gAsdEUNUJY: Downloading webpage

~/video> cat ~/.config/youtube-dl/config 
--proxy 'socks5://127.0.0.1:1080/'

If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):


Description of your issue, suggested solution and other information

Experimental SOCKS support stopped working in recent update. I have also tried this with the port elided from the --proxy specification in the configuration file.

I have confirmed that the proxy itself is working. I am using it to post this issue :)

Sorry to say I don't know precisely which previous version I was using that didn't bug out, but I think it was the one the day after the socks branch was merged. For your git bisect pleasure.

@OliverUv
Copy link
Author

@OliverUv OliverUv commented May 21, 2016

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented May 21, 2016

It's a known bug in 2016.05.16, and I've fixed it in git. Before a new version is released, use 2016.05.10 instead.

@yan12125 yan12125 closed this May 21, 2016
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.