An Amazon Promo Codes Scraping Tool developed with Pupeteer(Node Library).
This is an Amazon Promo Codes Scrapping Tool built with puppeteer. This Tools is built for an interview challenge by Eye Popping Deals.
It makes use of the puppeteer node library to scrape an Infinite scroll Amazon Promo Codes webpage.
Process:
- opens a headless chromium browser
- fills in login credentials and clicks signin button
- scrolls to the bottom after a delay of 1 second and extracts promo code items
- when the target number of items to scrape is reached, it closes the browser
- logs scrapped items in the console.
To use this scraper this is what you need to:
- Have nodejs installed in your computer
- Download or clone this repo:
- Clone with SSH:
git@github.com:PhillipUg/eye-popping-deals-test.git
- Clone with HTTPS
https://github.com/PhillipUg/eye-popping-deals-test.git
cd
intoeye-popping-deals-test
directory and runnpm install
- Add a
.env
file in your root directory(e.g.eye-popping-deals-test/.env
). In this file fill out the following variables:
EMAIL= your email
PASSWORD= your password
SITE_URL= link to your amazon promo codes page(copy the entire thing)
- Finally, run
node index.js
in your terminal.
This project was built using these technologies.
- Puppeteer
- JavaScript
- dotenv
Check out this video demonstration of how I built the scraper.
👤 Phillip Musiime
- LinkedIn: Phillip Musiime
- Twitter: @Phillip_Ug
- E-mail: phillipmusiime@gmail.com
This project is MIT licensed.