Closed GoogleCodeExporter closed 9 years ago
Hello there
i tried some quick hacking
if i add the following code to http_Request, everything works ok
proxy_support = urllib2.ProxyHandler( {'http': 'http://168.219.61.250:8080/'} /*
my proxy */ )
opener = urllib2.build_opener(proxy_support)
urllib2.install_opener(opener)
so i guess it is not so difficult to add some api for setting the proxy
configuration.
if its ok with you, i can contribute
Original comment by aman....@gmail.com
on 20 Jul 2009 at 9:21
had a quick look and added reading HTTP_PROXY from os env. if you have any
ideas on
where you want to opener initialized you're welcome to write a patch.
Original comment by berend.v...@gmail.com
on 11 Sep 2009 at 11:17
Original comment by berend.v...@gmail.com
on 11 Sep 2009 at 11:18
sorry, forgot to close this.
Proxy support is added through the HTTP_PROXY environment variable, set it and
the
urllib2 opener gets an proxy handler added.
Details:
Function pydelicious.build_api_opener accepts extra openers but this argument
is
unused within the package. The function itself just adds a HTTPErrorHandler
instance
and the proxy handler as described.
Use the extra_handlers argument in your own API initializer modelled after
pydelicious.dlcs_api_opener, and then override the DeliciousAPI build_opener
keyword
with the custom version.
Original comment by berend.v...@gmail.com
on 12 Feb 2010 at 7:15
Sorry for re-opening this issue, but you will also need to set the HTTPS proxy
to make it work behind corporate firewalls/proxies (which is simple):
if HTTP_PROXY:
extra_handlers += ( urllib2.ProxyHandler( {'http': HTTP_PROXY, 'https': HTTP_PROXY} ), )
Original comment by cluppr...@gmail.com
on 29 Jul 2010 at 9:15
Original issue reported on code.google.com by
aman....@gmail.com
on 20 Jul 2009 at 8:52