Доброе утро / вечер всем,
Я пытаюсь установить HTTP прокси при запуске своего скрипта. Я собираюсь использовать этот код, но я получаю сообщение об ошибке.
Мой код:
from selenium import webdriver
import time
profile = webdriver.FirefoxProfile()
profile.set_preference('network.proxy_type',1)
profile.set_preference('network.proxy.http',"179.50.10.187")
profile.set_preference('network.proxy.http_port',3128)
profile.update_preference()
driver=webdriver.Firefox(firefox_profile=profile)
drivre.get('http://whatismyipadress.com')
time.sleep(10)`
и ошибка:
traceback (most recent call last):
File "task.py", line 8, in <module>
profile.update_preference()
AttributeError: 'FirefoxProfile' object has no attribute 'update_preference`
Что мне делать? Спасибо за ответ.