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

tsocks should work. shouldn't it? #3812

Closed
umrashrf opened this issue Sep 22, 2014 · 2 comments
Closed

tsocks should work. shouldn't it? #3812

umrashrf opened this issue Sep 22, 2014 · 2 comments

Comments

@umrashrf
Copy link

@umrashrf umrashrf commented Sep 22, 2014

$  tsocks youtube-dl -v https://www.youtube.com/watch?v=Pov4qMSfg9w
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', 'https://www.youtube.com/watch?v=Pov4qMSfg9w']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.09.15.1
[debug] Python version 2.7.6 - Linux-3.13.0-34-generic-x86_64-with-Ubuntu-14.04-trusty
[debug] Proxy map: {}
[youtube] Setting language
WARNING: unable to set language: <urlopen error [Errno 8] _ssl.c:510: EOF occurred in violation of protocol>
[youtube] Pov4qMSfg9w: Downloading webpage
ERROR: Unable to download webpage: <urlopen error [Errno 8] _ssl.c:510: EOF occurred in violation of protocol>
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 211, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 1244, 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 645, in https_open
    return self.do_open(HTTPSConnectionV3, req)
  File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open
    raise URLError(err)

See this works.

$  tsocks scrapy shell --nolog http://ipecho.net/plain -c response.body
169.253.437.207
@JavaGarcia
Copy link

@JavaGarcia JavaGarcia commented Sep 24, 2014

You can use Delegate

$delegated -P8080 SERVER=http SOCKS=IPSocks:PortSocks
$youtube-dl -v --proxy "http://127.0.0.1:8080" https://www.youtube.com/watch?v=Pov4qMSfg9w
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 12, 2016

SOCKS proxy support has been added in youtube-dl 2016.05.10. You can use SOCKS proxy directly, e.g --proxy socks://127.0.0.1:9050.

@dstftw dstftw closed this Jun 12, 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
3 participants
You can’t perform that action at this time.