Skip to content


Subversion checkout URL

You can clone with
Download ZIP


youtube-dl fails to use proxy #293

patricklauer opened this Issue · 8 comments

5 participants


$ http_proxy="" youtube-dl
[youtube] Setting language
WARNING: unable to set language:
[youtube] z4KV7e8kwbI: Downloading video webpage
ERROR: unable to download video webpage:

--> of course it doesn't work if you don't use the proxy server ...


Seems like this could be a bug in urllib or urllib2. Have you tried a simple script to test your proxy?

import urllib2
import sys
url = sys.argv[1]
response = urllib2.urlopen(url)
html_string =
print html_string

As per the documentation, try to put the "http://" prefix before the host name.


Mmm, urllib2 seems ok with leaving out the http://. On which platform (Python version, Linux distribution) are you running youtube-dl? Can you update youtube-dl to 2012.02.26 and test with the new --verbose option? What does that output?


I just peeked at the code in urllib2 and you're completely right. It should go even as far back as Python 2.5. However, I distinctly remember having problems if I omitted the http:// prefix when I tested the feature after adding it. Could it be a subtle problem in youtube-dl's code? It could still be interesting to test with the prefix just in case.


Same with 2012.02.27 (running on Gentoo Linux / AMD64). The script from comment #1 hangs (which tells me that it does not respect the http_proxy env var)


youtube-dl --version:

uname -a;
Linux MacBookUbuntuPro 3.0.0-17-generic #30-Ubuntu SMP Thu Mar 8 20:45:39 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

http_proxy="" youtube-dl

Works like a charm!

rg3 commented

AR0x7E7, could you try without the http:// prefix to verify it still works or if it makes any difference?


http_proxy="" youtube-dl

Still works perfectly!

python --version:
Python 2.7.2+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.