Answer the question
In order to leave comments, you need to log in
How to log in to VK using Selenium + Python?
Script code, login and password I insert
from selenium import webdriver
def main():
driver = webdriver.Chrome('operadriver.exe')
driver.get('https://vk.com/login')
s_username = driver.find_element_by_name('email')
s_password = driver.find_element_by_name('pass')
s_continue = driver.find_element_by_id('login_button')
s_username.send_keys('логин/почта')
s_password.send_keys('пароль')
s_continue.click()
if __name__ == '__main__':
main()
Answer the question
In order to leave comments, you need to log in
Push programmatically by executing javascript as an option.
driver.execute_script("document.getElementById('index_login_button').click()")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question