Selenium with Tor+Firefox (Mac)

Install Selenium:

sudo easy_install selenium

If Homebrew is not installed:

ruby -e "$(curl -fsSkL"

Install Tor:

brew install Tor

Run Tor:


In another terminal window, run the python code to open Firefox+Tor and save a screenshot via Selenium:

from selenium import webdriver
profile.set_preference('network.proxy.type', 1)
profile.set_preference('network.proxy.socks', '')
profile.set_preference('network.proxy.socks_port', 9050)

See also:

Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: