Spaces:
Configuration error
Configuration error
muratgunaydin
commited on
Commit
•
31e236d
1
Parent(s):
553fccc
Upload 4 files
Browse files- LICENSE +21 -0
- README.md +68 -13
- requirements.txt +2 -0
- vfs-appointment-bot-main.zip +3 -0
LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
MIT License
|
2 |
+
|
3 |
+
Copyright (c) 2022 Ranjan Mohanty
|
4 |
+
|
5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6 |
+
of this software and associated documentation files (the "Software"), to deal
|
7 |
+
in the Software without restriction, including without limitation the rights
|
8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9 |
+
copies of the Software, and to permit persons to whom the Software is
|
10 |
+
furnished to do so, subject to the following conditions:
|
11 |
+
|
12 |
+
The above copyright notice and this permission notice shall be included in all
|
13 |
+
copies or substantial portions of the Software.
|
14 |
+
|
15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21 |
+
SOFTWARE.
|
README.md
CHANGED
@@ -1,13 +1,68 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# VFS Germany Appointment Bot
|
2 |
+
[![GitHub license](https://img.shields.io/github/license/ranjan-mohanty/vfs-appointment-bot)](https://github.com/ranjan-mohanty/vfs-appointment-bot/blob/main/LICENSE)
|
3 |
+
[![GitHub forks](https://img.shields.io/github/forks/ranjan-mohanty/vfs-appointment-bot)](https://github.com/ranjan-mohanty/vfs-appointment-bot/network)
|
4 |
+
[![GitHub stars](https://img.shields.io/github/stars/ranjan-mohanty/vfs-appointment-bot)](https://github.com/ranjan-mohanty/vfs-appointment-bot/stargazers)
|
5 |
+
[![GitHub issues](https://img.shields.io/github/issues/ranjan-mohanty/vfs-appointment-bot)](https://github.com/ranjan-mohanty/vfs-appointment-bot/issues)
|
6 |
+
[![Twitter](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fgithub.com%2Franjan-mohanty%2Fvfs-appointment-bot)](https://twitter.com/intent/tweet?text=Check%20this%20out%20&url=https%3A%2F%2Fgithub.com%2Franjan-mohanty%2Fvfs-appointment-bot)
|
7 |
+
|
8 |
+
|
9 |
+
A script to check the appointment slots.
|
10 |
+
|
11 |
+
By default, it runs every 2 minutes and check for visa slots at VFS website and notifies the user by SMS/call/Telegram. <br/>
|
12 |
+
The interval can be changed in the config.
|
13 |
+
|
14 |
+
## How to use
|
15 |
+
1. Clone the repo: `git clone https://github.com/ranjan-mohanty/vfs-appointment-bot.git` <br/>
|
16 |
+
2. Move into the repo: `cd vfs_appointment_bot` <br/>
|
17 |
+
3. Update the config file (`config/config.ini`) with VFS, Twilio, Telegram credentials. Note that you can use either telegram, or twilio, or both. This can be specified with `use_telegram` and `use_twilio` config flags in same file.
|
18 |
+
3. Create a new virtual environment: `python3 -m venv venv` or by using conda `conda create --name venv python=3.8`<br/>
|
19 |
+
4. Activate the environment (might differ a bit for windows and MacOS): `source venv/bin/activate` / `conda activate venv` <br/>
|
20 |
+
5. Install the dependencies: `pip install -r requirements.txt` <br/>
|
21 |
+
6. Run the script:
|
22 |
+
|
23 |
+
`python vfs_appointment_bot/vfs_appointment_bot.py '<vfs_centre>' '<visa_category>' '<visa_subcategory>'`
|
24 |
+
|
25 |
+
OR
|
26 |
+
|
27 |
+
`python vfs_appointment_bot/vfs_appointment_bot.py`
|
28 |
+
|
29 |
+
It will take the values as input from the user
|
30 |
+
|
31 |
+
** Please refer to the screenshot for more details regarding the inputs.
|
32 |
+
|
33 |
+
![VFS Appointment Form Screenshot](./assets/vfs-appointment-form.png)
|
34 |
+
|
35 |
+
## Dependency
|
36 |
+
|
37 |
+
1. Install Firefox Browser on your machine if not already installed.
|
38 |
+
2. `geckodriver` (instructions to install geckodriver are written below)
|
39 |
+
3. Setup client for Twilio/Telegram or both:
|
40 |
+
- Create an account on Twilio to get text and call alerts. Sign up [here](https://www.twilio.com/try-twilio) for a trial account to get credits upto worth $10, OR
|
41 |
+
- Create a new bot via Telegram and add it to a chat group where you want it to post messages to notify you. Check [this simple tutorial out](https://medium.com/codex/using-python-to-send-telegram-messages-in-3-simple-steps-419a8b5e5e2) if you don't know how to create a new bot and get its credentials. Once bot is created you need to add its credentials in `config/config.ini` file.
|
42 |
+
|
43 |
+
|
44 |
+
## How to install geckodriver
|
45 |
+
|
46 |
+
1. Run these the commands:
|
47 |
+
|
48 |
+
- Linux (as an example) : `wget https://github.com/mozilla/geckodriver/releases/download/v0.18.0/geckodriver-v0.18.0-linux64.tar.gz`
|
49 |
+
|
50 |
+
(You can find the download URL to the latest release of geckodriver on Github. Check out [their latest release here](https://github.com/mozilla/geckodriver/releases) for your machine.)
|
51 |
+
|
52 |
+
2. Extract the file with
|
53 |
+
|
54 |
+
`tar -xvzf geckodriver*`
|
55 |
+
|
56 |
+
3. Make it executable (note this shouldn't be necessary, unless the unzipped file doesn't have the execute bits set):
|
57 |
+
|
58 |
+
`chmod +x geckodriver`
|
59 |
+
|
60 |
+
4. Add the driver to your PATH in ~/.bashrc so other tools can find it:
|
61 |
+
|
62 |
+
`export PATH=$PATH:/path-to-extracted-file/geckodriver`
|
63 |
+
|
64 |
+
|
65 |
+
## Contributors
|
66 |
+
|
67 |
+
- [Ranjan Mohanty](https://github.com/ranjan-mohanty/)
|
68 |
+
- [Bhavul Gauri](https://github.com/bhavul/)
|
requirements.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
selenium==3.141.0
|
2 |
+
twilio==7.2.0
|
vfs-appointment-bot-main.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:977e13983159b7191afbd8c75475222db8ef31fbc1110417fd050984aa9f2b9c
|
3 |
+
size 144596
|