diff --git a/scraper.py b/scraper.py index a48d74b..b7b46a0 100644 --- a/scraper.py +++ b/scraper.py @@ -8,10 +8,10 @@ pos = 0 -for el in root.cssselect("div.shelf-grid__products a div.shelf-grid-product__details"): +for el in root.cssselect("div.shelf-grid__products a"): title = el.cssselect("h4.shelf-grid-product__title")[0].text_content() - author = el.cssselect("p.grid-product__author")[0].text_content() - link = el.cssselect("a")[0].attrib['href'] + author = el.cssselect("p.shelf-grid-product__author")[0].text_content() + link = el.attrib['href'] isbn = link.split("/")[2] pos += 1