from selenium import webdriver
import requests
profile=webdriver.FirefoxProfile()
profile.set_preference("network.proxy.type", 1)
profile.set_preference("network.proxy.http","124.40.251.146")
profile.set_preference("network.proxy.http_port",3128)
profile.update_preferences()
driver = webdriver.Firefox(firefox_profile=profile)
driver.get('http://www.ipchicken.com/')
Fixing Code Indentation. Can you please add more info to the question?