curl-and-python
how to use socks5 proxy in pycurl?
From: juhui <phpbird_at_gmail.com>
Date: Fri, 21 Apr 2006 09:58:16 +0800
Date: Fri, 21 Apr 2006 09:58:16 +0800
the code below can't work...
:(
import pycurl
c = pycurl.Curl()
c.setopt( pycurl.URL, 'http://www.test.com/test.html' )
import StringIO
b = StringIO.StringIO()
c.setopt( c.WRITEFUNCTION, b.write )
c.setopt( c.FOLLOWLOCATION, 1 )
c.setopt( c.MAXREDIRS, 5 )
c.setopt(c.PROXY,'www.test.com:1080')
c.setopt(c.PROXYTYPE,PROXYTYPE_SOCKS5)
c.setopt(c.PROXYUSERPWD, 'user:pass')
c.perform()
print b.getvalue()
how to use socks5 proxy in pycurl?
-- LB can FlY _______________________________________________ http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-pythonReceived on 2006-04-21