You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### New in v2.0: :email: E-mail notification support and an user interface :iphone: !! (see [screenshots](#Screenshots))
3
+
1
4
# StockAlertBot
2
-
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 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](https://github.com/PrinceS25/StockAlertBot/wiki/Beating-Scalpers).
5
+
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).
6
+
###### Of course, this is only half the battle. For full writeup on scoring items, look [here](https://github.com/PrinceS25/StockAlertBot/wiki/Beating-Scalpers).<br><br><br><br>
3
7
4
8
<palign="center">
5
9
Donate, buy me a <ahref="https://buymeacoff.ee/PrinceSingh"target="_blank">Pizza</a> or <ahref="https://paypal.me/PrinceSingh25"target="_blank">PayPal</a> me if you'd like to see this project expanded and support me. :) <br> <br>
@@ -10,11 +14,12 @@ Donate, buy me a <a href="https://buymeacoff.ee/PrinceSingh" target="_blank">Piz
10
14
<br><br>
11
15
12
16
13
-
>How does it work?
17
+
###How does it work?
14
18
15
-
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.
19
+
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.
20
+
<br><br>
16
21
17
-
>What stores/wesbites are supported?
22
+
###What stores/websites are supported?
18
23
19
24
Currently, the following stores are supported:
20
25
* AntOnline
@@ -28,49 +33,89 @@ Currently, the following stores are supported:
28
33
* Target (Works but may require additional setup)
29
34
* Tesco (UK. For PS5, use this link: https://www.tescopreorders.com/uk/ps5)
0. A Terminal: ([cmd](https://en.wikipedia.org/wiki/Cmd.exe) (Windows), [Terminal](https://en.wikipedia.org/wiki/Terminal_(macOS)) (macOS), or [Console](https://en.wikipedia.org/wiki/Linux_console) (Linux))
41
+
1. Install [Node.js](https://nodejs.org/en/), either LTS or Current.
42
+
2. Clone or [download](https://github.com/PrinceS25/StockAlertBot/archive/main.zip) this repository
There are only two steps to use this program: 1) enter information and 2) launch the program.
52
+
53
+
1. You can now enter information using two ways: via a browser (recommended) or a text editor.
54
+
#### Via Browser
55
+
1. At the root directory, run on the terminal:
56
+
`npm run settings`\
57
+
A browser window should open up. If it doesn't and the console says `Server started!`, go to: `http://localhost:3250/` in your browser.
58
+
2. Enter the links of the items you want to track in the URLs tab.
59
+
3. Go to Settings tab and change to your heart's content.\
60
+
If you have Amazon link(s), you will see an option to put delay between Amazon items.\
61
+
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](#Via-Text-Editor).
62
+
4. Configure notification options in Optional tab.\
63
+
If you want notifications sent to Discord or Slack, expand WEBHOOKS and enter the URL(s) there.\
64
+
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](#Via-Text-Editor).
65
+
5. Once you're happy with the settings, click `Save Settings`.\
66
+
`config.json` and `.env` files should now reflect your settings.\
67
+
You can use `CTRL + C` or `CMD + C` to stop the program.<br><br>
68
+
69
+
#### Via Text Editor
70
+
Open and edit `config.json`
71
+
1. Add urls of products in the `URLS` array
72
+
2. Change the `INTERVAL` to suit your desires.\
46
73
**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.
47
-
* Set `OPEN_URL` to false if you don't want the application to automatically open urls when item is in stock
48
-
* Set `ALARM` to false if you want to disable the audible warning
49
-
***If** you're planning to track more than one Amazon item, set the delay (in seconds) between items by editing `AMAZON_DELAY`.
50
-
Otherwise, Amazon may flag the program's requests as a bot.
51
-
***If** you're planning to track Target item(s), enter your zip code in `TARGET_ZIP_CODE`\
52
-
**NOTE:** If you encounter an error relating to API Key, you need to get this key yourself:
53
-
1. Go to target.com with the DevTools (Chrome) or Developer Tools (Firefox) open (Google or ask if you're unsure how)
54
-
2. On the console, you should see GET requests as you load the page.\
55
-
In DevTools, you have to click the gear and check "Log XMLHttpRequests" to see them
56
-
3. Click on any of the urls that has the string "key=" and copy the whole key
57
-
4. Paste it to `TARGET_KEY`
58
-
***If** you want to send alerts to webhook URL(s) like [Discord](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks) or [Slack](https://api.slack.com/messaging/webhooks), add them to `WEBHOOK_URLS` array
59
-
***If** you want to send alerts to email, change `EMAIL` in `config.json` to `true`. Make a copy of `example.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: `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.
67
-
2. Execute and continue about your day
68
-
`node main.js`\
69
-
OR\
70
-
`npm start`
71
-
3. Consider [donating](https://www.paypal.com/donate?business=3Y9NEYR4TURT8&item_name=Making+software+and+hacking+the+world%21+%E2%99%A5¤cy_code=USD) or buying me a [Pizza](https://buymeacoff.ee/PrinceSingh) or [PayPal](https://paypal.me/PrinceSingh25) me
72
-
73
-
### Things to work on
74
+
3. Set `OPEN_URL` to false if you don't want the application to automatically open urls when item is in stock
75
+
4. Set `ALARM` to false if you want to disable the audible warning
76
+
5. Optional Settings.
77
+
1.**If** you're planning to track more than one Amazon item, set the delay (in seconds) between items by editing `AMAZON_DELAY`.
78
+
Otherwise, Amazon may flag the program's requests as a bot.
79
+
2.**If** you're planning to track Target item(s), enter your zip code in `TARGET_ZIP_CODE`\
80
+
**NOTE:** If you encounter an error relating to API Key, you need to get this key yourself:
81
+
1. Go to target.com with the DevTools (Chrome) or Developer Tools (Firefox) open (Google or ask if you're unsure how)
82
+
2. On the console, you should see GET requests as you load the page.\
83
+
In DevTools, you have to click the gear and check "Log XMLHttpRequests" to see them
84
+
3. Click on any of the urls that has the string "key=" and copy the whole key
85
+
4. Paste it to `TARGET_KEY`
86
+
3.**If** you want to send alerts to webhook URL(s) like [Discord](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks) or [Slack](https://api.slack.com/messaging/webhooks), add them to `WEBHOOK_URLS` array
87
+
4.**If** you want to send alerts to email, change `EMAIL` in `config.json` to `true`. Make a copy of `example.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: `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.
95
+
96
+
2. Execute and continue about your day:
97
+
`npm start`\
98
+
You can use `CTRL + C` or `CMD + C` to stop the program.
99
+
100
+
3. Consider [donating](https://www.paypal.com/donate?business=3Y9NEYR4TURT8&item_name=Making+software+and+hacking+the+world%21+%E2%99%A5¤cy_code=USD) or buying me a [Pizza](https://buymeacoff.ee/PrinceSingh) or [PayPal](https://paypal.me/PrinceSingh25) me :smile:
101
+
102
+
103
+
## Screenshots
104
+
<br><br>
105
+
---
106
+
<br><br><br><br>
107
+
---
108
+
<br><br>
109
+
110
+
111
+
## Feedback and Support
112
+
To report bugs, please create an [issue](https://github.com/PrinceS25/StockAlertBot/issues).\
113
+
To ask questions, give feedback or suggestions among other things, create a new [discussion](https://github.com/PrinceS25/StockAlertBot/discussions).\
114
+
To contribute code, programming questions/guidance, gaming sessions, and more, add me on Discord: Prince#0584\
115
+
For monetary support, [donate](https://www.paypal.com/donate?business=3Y9NEYR4TURT8&item_name=Making+software+and+hacking+the+world%21+%E2%99%A5¤cy_code=USD) or buy me a [Pizza](https://buymeacoff.ee/PrinceSingh) or [PayPal](https://paypal.me/PrinceSingh25) me
116
+
117
+
118
+
## Things to work on
74
119
* Add more stores
75
120
* Walmart
76
121
* Gamestop
@@ -81,13 +126,21 @@ Currently, the following stores are supported:
81
126
* ~~Target~~
82
127
* ~~Tesco~~
83
128
* ~~Argos~~
84
-
* Add GUI - Make it easier to use
85
-
* Add ~~Email and~~ Maybe SMS Notifications
129
+
* Add delay between items from the same store
130
+
* Add ~~Email and Maybe~~ SMS Notifications
131
+
* More OOP!!
86
132
* ~~Fix~~ Find Bugs
133
+
* ~~Add GUI - Make it easier to use~~
87
134
* ~~Initially create seperation between intervals for Amazon items~~
88
135
* ~~Add a way to have independent delay timers for Amazon~~
89
136
* ~~Open product page when in stock~~
90
137
* ~~Add webhookURL to enable posting messages to Slack and Discord~~
91
138
139
+
140
+
## Main Technologies
141
+
- [Node.js](https://nodejs.org/) with [Express.js](https://expressjs.com/)
142
+
- [Vue.js](https://vuejs.org/) powered by [Vuetify](https://vuetifyjs.com/) and [Material Design Icons](https://materialdesignicons.com/)
143
+
144
+
92
145
## License
93
146
See the [LICENSE](LICENSE.md) file for license rights and limitations (MIT).
0 commit comments