scrapehero-code / amazon-scraper

A simple web scraper to extract Product Data and Pricing from Amazon
https://www.scrapehero.com/tutorial-how-to-scrape-amazon-product-details-using-python-and-selectorlib/
311 stars 158 forks source link

Empty results #4

Open xloem opened 3 years ago

xloem commented 3 years ago

Running the script without changes gives me an output.jsonl that looks like this:

{"name": null, "price": null, "short_description": null, "images": null, "rating": null, "number_of_reviews": null, "variants": null, "product_description": null, "sales_rank": null, "link_to_all_reviews": null}
{"name": null, "price": null, "short_description": null, "images": null, "rating": null, "number_of_reviews": null, "variants": null, "product_description": null, "sales_rank": null, "link_to_all_reviews": null}
{"name": null, "price": null, "short_description": null, "images": null, "rating": null, "number_of_reviews": null, "variants": null, "product_description": null, "sales_rank": null, "link_to_all_reviews": null}
ramirezemerick88 commented 3 years ago

Verify your selectors yml, this css selectors for website

xloem commented 3 years ago

The example doesn't work out of the box?

ramirezemerick88 commented 3 years ago

For search: products: css: 'div[data-component-type="s-search-result"]' xpath: null multiple: true type: Text children: title: css: 'h2 a.a-link-normal.a-text-normal' xpath: null type: Text url: css: 'h2 a.a-link-normal.a-text-normal' xpath: null type: Link rating: css: 'div.a-row.a-size-small span:nth-of-type(1)' xpath: null type: Attribute attribute: aria-label reviews: css: 'div.a-row.a-size-small span:nth-of-type(2)' xpath: null type: Attribute attribute: aria-label price: css: 'span.a-price:nth-of-type(1) span.a-offscreen' xpath: null type: Text image: css: 'img.s-image' xpath: null type: Image

xloem commented 3 years ago

I'm sorry, I tried this project briefly some time ago and ended up finding other solutions to my purchasing situation. Is this project intended to be a working open source amazon scraping tool?

MojoMoe commented 1 year ago

I am also getting similar results as xloem above:

{"name": "Automate the Boring Stuff with Python, 2nd Edition: Practical Programming for Total Beginners", "price": null, "short_description": null, "images": null, "rating": null, "number_of_reviews": null, "variants": null, "product_description": null, "sales_rank": null, "link_to_all_reviews": "/Automate-Boring-Stuff-Python-2nd-ebook/product-reviews/B07VSXS4NK?reviewerType=all_reviews"} {"name": null, "price": null, "short_description": null, "images": null, "rating": null, "number_of_reviews": null, "variants": null, "product_description": null, "sales_rank": null, "link_to_all_reviews": null} {"name": null, "price": null, "short_description": null, "images": null, "rating": null, "number_of_reviews": null, "variants": null, "product_description": null, "sales_rank": null, "link_to_all_reviews": null}

Is there a way to fix this?