Answer the question
In order to leave comments, you need to log in
How to download another page through selenium?
The problem is this: you need to take info from the site https://kinosmena.ru/release/11011 for example, BUT you need to look at the sessions for tomorrow, I open the page through selenium, click on the tomorrow button and how can I download the changed page, not the old one, here function code
def on_button(url):
browser = webdriver.Chrome(
executable_path="path")
browser.get(url)
sleep(2) # Что бы кнопки загрузились
element = browser.find_elements(By.CLASS_NAME, 'calendar__date')
close_but = browser.find_element(By.CLASS_NAME, 'button') # Закрытие уведомления #о ковид
#browser.execute_script("arguments[0].click();", element[1])
webdriver.ActionChains(browser).move_to_element(close_but).click(close_but).perform() # #Закрытие этого уведомления
webdriver.ActionChains(browser).move_to_element(element[1]).click(element[1]).perform()
print('END')
html = # Вот что сюда нужно вписать?
browser.quit()
print(BeautifulSoup(html, 'lxml').findAll('div', {'class':'seance-item__hall'})) # Должен вывести все залы,
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