Skip to content

Commit f8c45d3

Browse files
fix: update image selector in parse_search_page function
1 parent 5284ffd commit f8c45d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

g2-scraper/g2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def parse_search_page(response: ScrapeApiResponse):
4747
relative_link = result.xpath(".//div[contains(@class, 'elv-text-lg')]/parent::a/@href").get()
4848
link = urljoin(response.request.url, relative_link)
4949

50-
image = result.xpath(".//img[@itemprop='image']/@data-deferred-image-src").get()
50+
image = result.xpath(".//img[@alt='Product Avatar Image']/@src").get()
5151

5252
raw_rate = result.xpath(".//label[contains(text(), '/5')]/text()").get()
5353
rate = float(raw_rate.split("/")[0]) if raw_rate else None

0 commit comments

Comments
 (0)