Appointment checker for German Embassy in Pakistan
To host the appointment checker tool remotely, you need SSH access to a machine. This guide will use Digital Ocean (DO), feel free to use any other cloud service provider (e.g, AWS, GCP, etc).
- Click on the fork button in the top right corner of the page to make copy on your GitHub account for your use.
- Now navigate to your GitHub profile and ensure that you have the repository listed there:
-
Create a new GMail account. You can skip this step if you already have an account for bot usage.
-
While signed with this account, navigate to this link.
-
Navigate to the Security tab:
- Ensure that 2-Step Verification is turned on:
- Once you've configured 2-Step Verification, click on it and you'll be taken to another page. Scroll to the bottom to the App Passwords section click on the small arrow next to it.
- Click on the Select app dropdown and click Other (Custom name):
- Enter an appropriate name and click the Generate button:
- Now, copy the password that's in the popup and keep it somewhere safe. You'll have to create a new app password again if you lose this one.
- Sign up on the DO website. You'll need a working credit/debit card for this step.
Note: It would be better if you sign up using your GitHub account. This would save you from the hassle of linking your GitHub account later.
-
Navigate to the dashboard.
-
Click on Apps under the Manage section on the navigation menu left of the page.
- Press the Create App button and you'll get navigated to the page shown below. Ensure that you have the same configuration as shown in the screenshot below:
Note: In your case, the repository name would be
<your-username>/appointment-checker
- Once you click on Next, you'll be navigated to the following page.
- Ensure that there is only one machine by deleting the second one, as shown below:
- Now, click the Edit button on the machine that's left, you'll see the page below:
- Edit both Resource Type and Run Command so that it matches the screenshot below:
Note: Change the Command to
pm2 start main.py --interpreter python3 --no-daemon
as the one in the screenshot breaks.
Once you're done, click on the Back button in the bottom left corner.
- Now, click on the Edit Plan button and ensure that you have the following configuraiton:
Note: Feel free to use a bigger machine or a Pro machine; however, it would cost accordingly.
Once you're done, click on the Back button in the bottom left corner.
- Proceed to the subsequent page by clicking on the Next button, you'll see the following page:
- Now edit the Global Variables and add the following variables:
SENDER_EMAIL
: The email account through which the script will send the email.SENDER_PASS
: The password for the above email account. If you followed the steps above to create a new GMail account, then you need to use the password that you copied earlier here.RECVR_EMAILS
: List of emails to which the script will notify, space seperated.CHECK_AFTER_SEC
: The number of seconds after which the script should check whether the appointment is open or not (best to keep it at30
seconds).EMAIL_AFTER_MIN
: Number of minutes after which a status report is to be sent. Best to keep this at30
minutes to ensure that your mailing qouta doesn't expire for the day.KEYWORD
: The keyword for which the script searches in the appointment options on the webpage. For example, if you want the script to track the Winter intake, then set the value towinter
.
- Once done, click on Next and you'll be navigated to the Info page:
- Hit Next again and eventually click the Create Resources button at the bottom of the page: