Using urllib2 with SOCKS proxy
Is it possible to fetch pages with urllib2 through a SOCKS proxy on a one socks server per opener basic? I've seen the solution using setdefaultproxy method, but I need to have different socks in different openers. So there is SocksiPy library, which works great, but it has to be used this way: import socks import socket socket.socket = socks.socksocket import urllib2 socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, "x.x.x.x", y) That is, it sets the same proxy for ALL urllib2 requests. How can I have different proxies for different openers? Try with pycurl : import pycurl c1 = pycurl.Curl() c1