Skip to content

Instantly share code, notes, and snippets.

@allatambov
Created March 22, 2022 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save allatambov/accb80b5cd1c8e2edabc31b01cf5d239 to your computer and use it in GitHub Desktop.
Save allatambov/accb80b5cd1c8e2edabc31b01cf5d239 to your computer and use it in GitHub Desktop.
br = wd.Chrome("/Users/allat/Downloads/chromedriver")
br.get("https://vk.com/")
login = br.find_element_by_id("index_email")
login.send_keys("allatambov@mail.ru")
password = br.find_element_by_id("index_pass")
# enter your password here
password.send_keys("")
go = br.find_element_by_id("index_login_button")
go.click()
br.get("https://vk.com/friends")
search = br.find_element_by_link_text("Поиск друзей")
search.click()
pars = br.find_element_by_id("friends_filters_block")
pars.click()
cnt = br.find_element_by_id("cCountry")
cnt_inp = cnt.find_element_by_tag_name("input")
cnt_inp.send_keys("Россия")
from selenium.webdriver.common.keys import Keys
cnt_inp.send_keys(Keys.RETURN)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment