Faced with the scenario of scalpers using bots to hog up all the inventory of popular holiday toys and sell them at ridiciously high markup price, I decided to at least attempt to put up a fight so we can get our hands on things we want need to survive the #Coronavirus quarantine(s). Of course, this is only half the battle. For full writeup on scoring items, look here.
Buy me a Pizza or PayPal me if you'd like to see this project expanded and support me. :)
How does it work?
Enter the product URLs and set how often you want the program to check if those products are in stock. When an item becomes available, it will notify you through both text on console and three auditory beeps as well as opening the product page automatically in your default web browser if you allowed it to do so. You may further configure to send alerts to Slack or Discord.
What stores/wesbites are supported?
Currently, the following stores are supported:
- AntOnline
- Amazon (Fails at low interval rates)
- Argos (UK. For PS5, use product link. Disc: https://www.argos.co.uk/product/8349000, Digital: https://www.argos.co.uk/product/8349024)
- Best Buy (including open-box)
- Costco
- Microcenter
- Newegg
- Target (Works but may require additional setup)
- Tesco (UK. For PS5, use this link: https://www.tescopreorders.com/uk/ps5)
- Install Node.js
- Clone or download this repository
git clone https://github.com/PrinceS25/StockAlertBot.git
- Change directory
cd StockAlertBot
- Install npm packages
npm install
- Open and edit main.js
- Add urls of products in the
URLS
array - Change the
INTERVAL
to suit your desires.
WARNING: Having the interval too low might have negative consquences such as this program being detected as a bot (Amazon), or blocking your IP from accessing the website. - Set
OPEN_URL
to false if you don't want the application to automatically open urls when item is in stock - If you're planning to track more than one Amazon item, set the delay (in seconds) between items by editing
AMAZON_DELAY
. Otherwise, Amazon may flag the program's requests as a bot. - If you're planning to track Target item(s), enter your zip code in
TARGET_ZIP_CODE
NOTE: If you encounter an error relating to API Key, you need to get this key yourself:- Go to target.com with the DevTools (Chrome) or Developer Tools (Firefox) open (Google or ask if you're unsure how)
- On the console, you should see GET requests as you load the page.
In DevTools, you have to click the gear and check "Log XMLHttpRequests" to see them - Click on any of the urls that has the string "key=" and copy the whole key
- Paste it to
TARGET_KEY
- If you want to send alerts to webhook URL(s) like Discord or Slack, add them to
WEBHOOK_URLS
array
- Add urls of products in the
- Execute and continue about your day
node main.js
- Consider buying me a Pizza or PayPal'ing me
- Add more stores
- Walmart
- Gamestop
NeweggAntOnlineTargetTescoArgos
- Add GUI - Make it easier to use
- Add Email and Maybe SMS Notifications
FixFind BugsInitially create seperation between intervals for Amazon itemsAdd a way to have independent delay timers for AmazonOpen product page when in stockAdd webhookURL to enable posting messages to Slack and Discord