diff --git a/amazon/spiders/amazon_search_product.py b/amazon/spiders/amazon_search_product.py index 0a5f2df..80cdd16 100644 --- a/amazon/spiders/amazon_search_product.py +++ b/amazon/spiders/amazon_search_product.py @@ -43,7 +43,7 @@ def parse_product_data(self, response): image_data = json.loads(re.findall(r"colorImages':.*'initial':\s*(\[.+?\])},\n", response.text)[0]) variant_data = re.findall(r'dimensionValuesDisplayData"\s*:\s* ({.+?}),\n', response.text) feature_bullets = [bullet.strip() for bullet in response.css("#feature-bullets li ::text").getall()] - price = response.css('.a-price span[aria-hidden="true"] ::text').get("") + price = response.css('.a-price-decimal span[aria-hidden="true"] ::text').get("") if not price: price = response.css('.a-price .a-offscreen ::text').get("") yield { @@ -54,4 +54,4 @@ def parse_product_data(self, response): "feature_bullets": feature_bullets, "images": image_data, "variant_data": variant_data, - } \ No newline at end of file + }