title: Using urllib2 with SOCKS proxy
body: <p>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.</p>
  
  <p>So there is SocksiPy library, which works great, but it has to be used this way:</p>
  
  <pre><code>import socks
  import socket
  socket.socket = socks.socksocket
  import urllib2
  socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, "x.x.x.x", y)
  </code></pre>
  
  <p>That is, it sets the same proxy for ALL urllib2 requests. How can I have different proxies for different openers?</p>