Не могу найти где ошибка в данном коде:
from bs4 import BeautifulSoup as BS
import requests
import lxml
from selenium import webdriver
def get_data(url):
driver = webdriver.Firefox()
headers = {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36"
}
req = requests.get(url, headers)
src = req
soup = BS(src.text, "lxml")
print(soup)
button = soup.find_all('div', class_='styles__blookContainer___36LK2-camelCase')
status_of_blooks = []
names_of_blooks = []
rarety_of_blooks = []
image_urls = []
for button in button:
buttons = button.find_parent('div')
buttons = button.click()
name = buttons.find('div', class_='styles__nameText___1rn87-camelCase').text
print(name)
names_of_blooks.append(name)
status_of_blook = buttons.find('div', class_='styles__quantityText___108Dj-camelCase').text
status_of_blooks.apped(status_of_blook)
rarety_of_blook = buttons.find('div', class_='styles__rarityText___2SGQD-camelCase').text
rarety_of_blooks.append(rarety_of_blook)
image_url = buttons.find('div', class_='styles__blookContainer___36LK2-camelCase styles__headerBlookImage___2DD0v-camelCase').find('img').get('src').text
image_urls.append(image_url)
print(image_urls)
print(status_of_blooks)
print(names_of_blooks)
return rarety_of_blooks
print(get_data('https://dashboard.blooket.com/blooks'))
Не пойму почему не парсит ничего