How to configure proxy using Squid -
i have connection , want change connection behavior of process connect through proxy. use new ip in event detects has been throttled.
the new connection process want : connect our server -> proxy -> required site if throttled: establish new connection through proxy (need confirm new ip being allocated proxy)
you can try piece of code
import urllib2 proxy_support = urllib2.proxyhandler({"http":"---url of proxy goes here---"}) opener = urllib2.build_opener(proxy_support) urllib2.install_opener(opener) urllib2.urlopen(---base-url goes here---).geturl()
Comments
Post a Comment