driver.find_element(by = By.LINK_TEXT, value='.//div[text()="Другие планеты"]').click()
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
import requests
from bs4 import BeautifulSoup as bs
import pandas as pd
url_template = "https://estel-shop.ru/catalog/ukhod/?PAGEN_1="
file_name = 'ukhod.xlsx'
href = []
title = []
cost = []
for i in range(18):
url = url_template + str(i)
print(url)
r = requests.get(url)
r.encoding = 'utf-8'
soup = bs(r.text, 'html.parser')
print(f"Код подключения : {r.status_code} ")
catllog = soup.find_all('div', class_= 'catalog_item_wrapp')
for block in catllog:
product_names = block.find('div', class_='item-title')
product_price = block.find('div', class_='price')
product_stock = block.find('span', class_='value').text.strip()
if product_stock != 'Нет в наличии':
href.append('https://estel-shop.ru' + product_names.a['href'])
title.append(product_names.text.strip())
cost.append(product_price.text.strip())
result_list = {'href': href, 'title': title, 'cost': cost}
df = pd.DataFrame(data=result_list)
df.to_excel(file_name)