0
嗨,我希望我的爬虫使用Pycurl使用Tor。我怎样才能做到这一点?我知道如何做到这一点使用httplib与Pycurl使用Tor吗?
proxy_support = urllib2.ProxyHandler({"http" : "127.0.0.1:8118"})
opener = urllib2.build_opener(proxy_support)
opener.addheaders = [('User-agent', 'Mozilla/5.0')]
print opener.open('http://www.google.com').read()
请帮助。
可能http://stackoverflow.com/questions/2537726/using-urllib2-with-socks-proxy – Vilva
它的不重复。这个问题是关于pycurl的实现,而那个是关于httblin2的实现。反正,thanx – codersofthedark