import unittest
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from time import sleep
import names
import random
chars = 'abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
chars1 = 'abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'
proxy = "62.33.207.201"
port = "80"
while True:
profile = webdriver.FirefoxProfile()
profile.set_preference("network.proxy.type", 1)
profile.set_preference("network.proxy.http", proxy)
profile.set_preference("network.proxy.http_port", port)
profile.set_preference("network.proxy.ssl", proxy)
profile.set_preference("network.proxy.ssl_port", port)
profile.update_preferences()
driver = webdriver.Firefox(executable_path="C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python37-32\\geckodriver.exe", firefox_profile=profile)
driver.get("https://www.iplocation.net/find-ip-address")
if __name__ == "__main__":
unittest.main()
Пытаюсь установить прокси , но что то безрезультатно ... Как сделать все правильно ?