Answer the question
In order to leave comments, you need to log in
On PythonAnywhere through Selenium is not authorized. Why?
Hello. There is this code:
browser.get('https://www.vk.com')
email = browser.find_element_by_id('index_email')
password = browser.find_element_by_id('index_pass')
login = browser.find_element_by_id("index_login_button")
time.sleep(2)
email.send_keys('login')
time.sleep(2)
password.send_keys('pass')
time.sleep(2)
password.send_keys(Keys.RETURN)
time.sleep(2)
browser.get('https://vk.com/im?sel=-166948584')
time.sleep(2)
msgs = browser.find_elements_by_class_name('_im_log_body')
msgs.reverse()
msg = msgs[0].text
options.add_argument(r"--user-data-dir=/путь/к/папке/с/профилями")
options.add_argument("--profile-directory=Название_папки_с_нужным_профилем")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question