cards_hrefs
, titles
, prices
).for items in data:
cards = data.find_all("div", class_="card-body")
for card in cards:
catalog.append({
"link to the product": "https://scrapingclub.com" + card.find("a").get("href"),
"title": card.find("h4").text.strip(),
"price": card.find("h5").text.strip()
})
data = soup.find("div", class_="row my-4")
catalog = []
cards = data.find_all("div", class_="card-body")
for card in cards:
catalog.append({
"link to the product": "https://scrapingclub.com" + card.find("a").get("href"),
"title": card.find("h4").text.strip(),
"price": card.find("h5").text.strip()
})