R
R
Roma32343432022-01-11 21:13:29
Python
Roma3234343, 2022-01-11 21:13:29

Each time you run the code, it requires authorization, what should I do?

from selenium import webdriver
browser = webdriver.Chrome()
browser.get("https://web.telegram.org/z/#-485846836")

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Karbivnichy, 2022-01-11
@Roma3234343

Obviously, the authorization data needs to be stored somewhere. You can create and connect a profile:

from selenium import webdriver
from selenium.webdriver.chrome.options import Options

options = Options()
options.add_argument("user-data-dir=/home/sergey/SeleniumProfile")
driver = webdriver.Chrome(chrome_options=options)
driver.get("https://google.com")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question