Update and rename bd.py to bd

This commit is contained in:
Axeten
2023-03-29 22:54:31 +03:00
committed by GitHub
parent 6ba3fd87f6
commit 366f4b28e6
@@ -23,9 +23,9 @@ browser.get('https://www.hellride.ru/catalog/zapchasti-dlya-tryukovyh-samokatov/
html_code = browser.page_source html_code = browser.page_source
soup = BeautifulSoup(html_code, 'lxml') soup = BeautifulSoup(html_code, 'lxml')
name = soup.find_all('div', class_='product-card__title') name = soup.find_all('span', class_='product-card__title')
price = soup.find_all('div', class_='product-card__price') price = soup.find_all('span', class_='product-card__price')
picture = soup.find_all('div', class_='product-slider__slide-img swiper-lazy swiper-lazy-loaded') picture = soup.find_all('img', class_='product-slider__slide-img swiper-lazy swiper-lazy-loaded')
for i in range(len(name)): for i in range(len(name)):
url = picture[i].find('img').attrs['src'] url = picture[i].find('img').attrs['src']