Answer the question
In order to leave comments, you need to log in
python selenium. Help with yandex pagination?
The essence of the question I can not understand how to implement a search on the pages of Yandex.
You need to find the site and go to it.
The site is at about 28th place. Often positions jump.
Help implement.
from selenium import webdriver
import time
driver = webdriver.Chrome()
driver.get("http://www.yandex.ru")
search_string = driver.find_element_by_id("text")
search_string.send_keys("Аудиосказки на ночь")
search_string.submit()
test1 = driver.find_element_by_css_selector('.pager__item_kind_next').click() # Нажать кнопку следующая страница.
test2 = driver.find_element_by_link_text("audiobaby.ru").click()
time.sleep(3)
driver.quit()
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