Sample Amazon Scraper
This is a sample scraper I wrote as a capstone for Business Track/Codeless Automation path. I took the idea from the scraper I wrote for a client project and wrote a practical example of a scraper for anyone learning selenium to easily follow along or edit as needed for other projects.
Attached are the sample scraper and sample input files. You can also find them in this
GitHub repository.
It is written in Python 3 using Selenium and Beautiful Soup 4. It is also using Chrome but can be edited to use other browsers. You just need to make sure that you have the correct webdriver for your browser. You can find the Chrome Driver
here.
It will take an input file with one column of search terms per row, search that term on Amazon, and write the name, rating, and URL of the top result to a new csv file, sample_output.csv.
There are comments almost every line to help walk you through, but if anyone has any questions or needs any help with it, please don't hesitate to reach out to me.
Webdriver Error
When completing the Python learning path and beginning to learn Selenium, there was an issue I encountered with having the webdriver in the correct location. Looking back at it, it was a simple issue that I should've easily been able to avoid but still ended up spending a little bit of time trying to figure out why it wasn't working. The issue was that I didn't have the webdriver in the same folder as the Python script I was running (or I just didn't have my webdriver.Chrome() pointing to where I actually had it). This is a quick video I made to help anyone having an error about their webdriver not being found.
--
CashBarnes - 07 Oct 2020