0

I need in using Tor+Privoxy with my python-script.

proxies = {
    'http'  : '127.0.0.1:8118',
    'ssl'   : '127.0.0.1:8118',
    'socks' : '127.0.0.1:9050'
}

The first question: is the 'socks' name right? Maybe there should be something like 'socks5'? The next step is that I should pass user-agent string with this proxies to the urllib and save information from loaded site into .html file. I don't know how to pass headers information with proxies.

Max Frai
  • 61,946
  • 78
  • 197
  • 306

2 Answers2

0

not sure whether urllib is able to deal with socks proxy.. you may try socksipy

mykhal
  • 19,175
  • 11
  • 72
  • 80
0

I suggest you use urllib2 instead. This post might be useful. hope it helps

Community
  • 1
  • 1
Mermoz
  • 14,898
  • 17
  • 60
  • 85