screenshots)
New in v2.0: 📧 E-mail notification support and an user interface 📱 !! (seeStockAlertBot
Faced with the scenario of scalpers using bots to hog up all the inventory of popular holiday toys and sell them at ridiculously high markup prices, I decided to put up a fight so we can get our hands on things we want need to survive the #Coronavirus quarantine(s).
here.
Of course, this is only half the battle. For full writeup on scoring items, look
Donate, buy me a Pizza or PayPal me if you'd like to see this project expanded and support me. :)
How does it work?
Enter links of the products you want tracked and how often you want the program to check if those products are in stock. When an item becomes available, you may configure it to notify you through variety of alerts including sound, email, discord and slack notifications, text on console, automatically opening the URL in your browser, and more to come.
What stores/websites are supported?
Currently, the following stores are supported:
- AntOnline
- Amazon (fails at low interval rates, see proxies)
- Argos (UK. Does not currently work with proxies) (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 and combos. Does not currently work with proxies)
- Costco (Does not currently work with proxies)
- Currys (UK)
- Gamestop
- Microcenter
- Newegg (including combo deals)
- Target (Works but may require additional setup)
- Tesco (UK. Does not currently work with proxies) (For PS5, use this link: https://www.tescopreorders.com/uk/ps5)
Prerequisites
- A Terminal: (cmd (Windows), Terminal (macOS), or Console (Linux))
- Install Node.js, either LTS or Current.
- Clone or download this repository
git clone https://github.com/PrinceS25/StockAlertBot.git
- Go to root directory
cd StockAlertBot
- Install npm packages via a terminal
npm install
Usage
There are only two steps to use this program: 1) enter information and 2) launch the program.
-
You can now enter information using two ways: via a browser (recommended) or a text editor.
Via Browser
- At the root directory, run on the terminal:
npm run settings
A browser window should open up. If it doesn't and the console saysServer started!
, go to:http://localhost:3250/
in your browser. - Enter the links of the items you want to track in the URLs tab.
- Go to Settings tab and change to your heart's content.
- If you want to use Proxies, turn it on and create a file called
proxies.txt
in the root directory and fill it with one proxy per line. See proxies. - If you have Amazon link(s), you will see an option to put delay between Amazon items.
- If you have Target link(s), you will see additional options to put zip code and API Key. Only change the key if you get API key errors. Refer to the instructions in the following section.
- If you want to use Proxies, turn it on and create a file called
- Configure notification options in Optional tab.
- If you want notifications sent to Discord or Slack, expand WEBHOOKS and enter the URL(s) there.
- If you want notifications sent to Email, turn on email and enter your service provider information. Some providers (Yahoo, AOL, AT&T) cause problems. Refer to following section.
- Once you're happy with the settings, click
Save Settings
.
config.json
and.env
files should now reflect your settings.
You can useCTRL + C
orCMD + C
to stop the program.
Via Text Editor
Open and edit
config.json
- 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. See proxies. - Set
OPEN_URL
to false if you don't want the application to automatically open urls when item is in stock - Set
ALARM
to false if you want to disable the audible warning - Optional Settings.
- 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. - If you want to use Proxies, change
PROXIES
totrue
and create a file calledproxies.txt
in the root directory and fill it with one proxy per line. See proxies. - If you want to send alerts to email, change
EMAIL
inconfig.json
totrue
. Make a copy ofexample.env
and rename it to.env
. Inside.env
, type out one of the following service providers (EMAIL_SERVICE
), your email (EMAIL_FROM
) and password (EMAIL_PASS
) and the email you want alerts sent to (EMAIL_TO
). All without quotes.
NOTE: If you receive the error:Gmail, Yahoo, iCloud, Hotmail, Outlook365, QQ, 126, 163, 1und1, AOL, DebugMail, DynectEmail, FastMail, GandiMail, Godaddy, GodaddyAsia, GodaddyEurope, hot.ee, mail.ee, Mail.ru, Maildev, Mailgun, Mailjet, Mailosaur, Mandrill, Naver, OpenMailBox, Postmark, QQex, SendCloud, SendGrid, SendinBlue, SendPulse, SES, SES-US-EAST-1, SES-US-WEST-2, SES-EU-WEST-1, Sparkpost, Yandex, Zoho, qiye.aliyun
535 5.7.0 (#AUTH005) Too many bad auth attempts
, most likely you are using Yahoo for the email server or an email server managed by Yahoo, such as AOL or AT&T. Yahoo has implemented an option that by default, does not let 3rd party products access the email servers. To resolve, go to https://login.yahoo.com/account/security and then enable the option to allow apps that use less secure sign in. Use the password generated by "Generate app password". If you are using AOL, do the same thing, from https://login.aol.com/account/security. - If you're planning to track more than one Amazon item, set the delay (in seconds) between items by editing
- At the root directory, run on the terminal:
-
Execute and continue about your day:
npm start
ORnode --experimental-modules main.js
You can useCTRL + C
orCMD + C
to stop the program.
Proxies
If you plan to use low interval rates OR track several items from one store, it is highly recommended that you use proxies such as ones from Webshare in the format ip:port
for IP-based authentication or username:password@ip:port
.
NOTE: The following stores do not currently with proxies due to them blocking some connections/headers which results in inconsistent connection: Argos, Best Buy, Costco, and Tesco. Thus we thought it'd be best if we take off proxy support for now until we can do some further research or find an alternative way.
Screenshots
Feedback and Support
To ensure this program continues to work, please report bugs by creating an issue.
To ask questions, give feedback or suggestions among other things, create a new discussion.
To contribute code, programming questions/guidance, gaming sessions, and more, add me on Discord: Prince#0584
To provide monetary support, donate or buy me a Pizza or PayPal me
Things to work on
- Add more stores
- Walmart
- B&H Photo Video
GamestopCurrysNewegg CombosNeweggAntOnlineTargetTescoArgos
- Add delay between items from the same store
- Add
Email and MaybeSMS Notifications - More OOP!!
- Add way to track notification status independent of items in a store
FixFind BugsAdd ProxiesAdd GUI - Make it easier to useInitially 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
Main Technologies
- Node.js with Express.js
- Vue.js powered by Vuetify and Material Design Icons
License
See the LICENSE file for license rights and limitations (MIT).