Automatically purchase things from Newegg Canada when they come in stock
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Kevin MacMartin b8b22fe869 Increase the timeouts for controls appearing, and decrease the time between checking the active time to every 30 seconds 2 years ago
.gitignore Initial commit 2 years ago
config.example.json Allow for unlimited retries, add configuration to set a start and end time for checking, don't fail if a network error prevents a page from loading, and update the readme 2 years ago
newegg-purchaser.js Increase the timeouts for controls appearing, and decrease the time between checking the active time to every 30 seconds 2 years ago
readme.md Allow for unlimited retries, add configuration to set a start and end time for checking, don't fail if a network error prevents a page from loading, and update the readme 2 years ago

readme.md

Setup

Install Dependencies

PUPPETEER_PRODUCT=firefox npm install puppeteer

Setup Configuration

  1. cp config.example.json config.json
  2. Edit config.json:
  • username: newegg username
  • password: newegg password
  • cv2: code on the back of your credit card
  • item_page: the part of the URL (starting with a slash) for the product after https://www.newegg.ca (eg: /amd-ryzen-9-5900x/p/N82E16819113664)
  • refresh_time: amount of time between page refreshes (with a random variance)
  • refresh_tries: the number of times the script will check before quitting (set to 0 for unlimited)
  • start_time: a 24 hour time in the format 7:00 that determines when the script will start checking for the day
  • end_time: a 24 hour time in the format 20:00 that determines when the script will stop checking for the day
  • auto_submit: set this to false if you want to do a test run (everything up to the actual purchase)
  • price_limit: set this to a number you don't want your cart total to exceed before checking out

Credits

Inspired by and some code borrowed from: https://github.com/Ataraksia/NeweggBot