Я использую следующий код:
Код: Выделить всё
import requests
from selenium import webdriver
driver = webdriver.Firefox()
url = "some_url" #a redirect to a login page occurs
driver.get(url) #the login page is displayed
#making a persistent connection to authenticate
params = {'os_username':'username', 'os_password':'password'}
s = requests.Session()
resp = s.post(url, params) #I get a 200 status_code
#passing the cookies to the driver
driver.add_cookie(s.cookies.get_dict())
Как изменить приведенный выше код, чтобы пройти через веб-страницу аутентификации?
Подробнее здесь: https://stackoverflow.com/questions/420 ... logging-in