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

searchresults.py add variations products #10

Closed mkudev closed 10 months ago

mkudev commented 10 months ago

Please, how to add searchresults.py to scrape all variations?, this need it! , script work fine for me. I try sync with woocommerce

mkudev commented 10 months ago

I solved my issue. create search_results_selectors.yml":

yaml Copy code products: css: 'div.s-result-item' multiple: true type: Text children: title: css: 'span.a-text-normal' type: Text price: css: 'span.a-price span.a-offscreen' type: Text variables: # Agrega selectores para las variables aquí css: 'div.variation-style-name' type: Text

e = Extractor.from_yaml_file('search_results_selectors.yml')