Answer the question
In order to leave comments, you need to log in
How does Selenium authorize on websites?
Good day.
My Python + Selenium authorization example:
from selenium import webdriver
chromedriver = 'D:\\temp\\selenium\\chromedriver.exe'
browser = webdriver.Chrome(executable_path=chromedriver)
browser.get('https://example.com/login/')
email = browser.find_element_by_id('email')
password = browser.find_element_by_id('password')
login = browser.find_element_by_id('submit')
email.send_keys('my_mail')
password.send_keys('my_pass')
login.click()
Answer the question
In order to leave comments, you need to log in
It's a creative process! ))) To begin with, what is your user agent? HeadlessChrome? If so, use something more appropriate.
from selenium.webdriver.chrome.options import Options
opts = Options()
opts.add_argument("user-agent=здесь какой-нибудь Хром Юзер Агент", executable_path=chromedriver)
browser = webdriver.Chrome(chrome_options=opts)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question