This bot snipes the closest time (based on your logic) for an ICBC Road Test.
The philosophy of this software is that you have this automated tool that refreshes the page and books you an appointment close to when you want because some other person decided to cancel their appointment for whatever reason. Instead of you manually refreshing the page to find that open spot, this script automates that for you. That's all.
- Basic knowledge of:
- Working with Command Line interface
- Basic knowledge of JavaScript
- Basic knowledge of Node.js and NPM
- You need to install Node.js (https://nodejs.org/en/download/)
-
Rename the config-sample.js to config.js
-
Replace your ICBC credentials with the placeholders, and for automating the whole process, setup your email's IMAP protocol and replace the placeholders with your creds in config.js as well. ❗Don't forget to keep that
config.js
file safe from any accesses❗ -
Change the logic to your favour
Inconfig.js
use any of these 4 syntaxes to filter out the dates you want to book your appointment on: -
There are other configurations you can change in
config.js
as well. Feel free to take a look at and maybe change them as you see fit.
For it to automatically read your email inbox, enable the IMAP protocol and turn on the "allow for less-secure apps" in your settings.
For Gmail:
- https://support.google.com/accounts/answer/6010255?hl=en
- https://support.google.com/mail/answer/7126229?hl=en#zippy=
Update❗❗: Gmail updated their security policies. So, now you have to make sure you enabled your 2-step-verification on your gmail. And refer to this link to setup and use "App Passwords": https://support.google.com/accounts/answer/185833
In the App Password setting, select the "Other" option from the drop down (see the image below):
Then pick a name (whatever you want) and just click "Generate". You'll get a random generated password. Copy that and use it as your IMAP password in config.js
.
- You then will use your App Password instead of your regular gmail password, in the
config.js
npm install
npm run start