Zur deutschen Version geht's hier.
A little weekend project of mine. The bot monitors the REST-API of the lower saxony vaccination portal (https://impfportal-niedersachsen.de) for free vaccination slots and sends a notification via mail. From then on, unfortunately, the fastest wins. Please do not abuse the bot and use moderate intervals.
- Automatic search for short term vaccination dates
- Notifications via email and telegram & many more
- Opens your browser automatically when an appointment is found. All you have to do is enter your details!
- Simple setup with GUI
What the impfbot doesn't do: Book the appointment for you and/or enter your data automatically.
Using this bot does not guarantee to get you a vaccination appointment. Please also use the waiting list of your local vaccination centre and your family physician!
- python 3.x via https://www.python.org/downloads/
Using Windows as an example:
- download and install python from here: https://www.python.org/downloads/
- download the bot (Releases on the right side or here)
- unpack the archive (the zip file)
- rename
config.example.ini
toconfig.ini
and fill in your data (zip code, birthday, email server data) - double-click on
windows_validate.bat
to check the config file - double-click on
windows_start.bat
For advanced users, a docker container is also available as an alternative. See docker for more information. Validating the config works via the command docker exec impfbot python src/validate_config.py -a
.
- write to https://t.me/BotFather and create bot. Then copy the token to
config.ini
.
The following steps must be performed for everyone who wants to receive messages.
- write to https://t.me/userinfobot and copy "Id"-number into
config.ini
(separated with,
) - ⚠ You have to start a conversation with your own bot before! (URL is in the Botfather message, press /start there). ⚠
- validate that everything works: Double click on
test_telegram.bat
- [COMMON]: General settings
birthday
- Birthday to be queried. Example:23.06.1912
.group_size
- Size of the group for which an appointment is requested (2 to 15). Example:5
zip_code
- Five-digit zip code for your vaccination center. Example:49123
with_vector
- For the under 60s: should also be searched for vector vaccines? Example:true
- [EMAIL]: Email settings
enable
- Specifies whether emails should be sent.true
if yes,false
otherwise.sender
- The email address from which the notifications should be sent. Example:[email protected]
.user
- Login name for the SMTP server (in most cases identical with the sender address)password
- The password for the SMTP server.server
- The SMTP server. Example:smtp.server.tld
.port
- The port for the SMTP server. Example:465
.receivers
- A list of e-mail addresses to which a message should be sent. Example:[email protected],[email protected],[email protected]
or (only to itself)[email protected]
.
- [TELEGRAM]: Telegram settings
enable
- Specifies whether Telegram messages should be sent.true
if yes, otherwisefalse
.token
- The bot token from https://t.me/BotFatherchat_ids
- User-ID of the recipient: use https://t.me/userinfobot
- [WEBBROWSER]: Web browser settings
enable
- Determines if the browser should be opened automatically. (Only on desktop systems)true
if yes, otherwisefalse
.
- [APPRISE]: Various notification services (Pretty much anything you can think of).
enable
-true
if Apprise should be used, otherwisefalse
'.service_uris
- Service-URIs. For more information please visit: Apprise Documentation
- [ADVANCED]: Settings for advanced users. It's gettting experimental 🤓
cooldown_between_requests
- wait time between requests. A too small wait time leads to an IP ban (default: 1min, but can be decreased empirically)cooldown_between_failed_requests
- waiting time between failed attempts. For each additional one, the waiting time is added again to prevent an IP ban. I.e. five failures = waiting time of 5*10s until the next request.cooldown_after_ip_ban
- If a query fails 10 times the IP is probably banned. By default it will wait for 3h.cooldown_after_success
- Cooldown after an vaccination slot was found. By default it will wait 15min.jitter
- random time span from 0-jtter seconds which is added to the wait times (default:5
)sleep_at_night
- Specifies if the bot should sleep at night (default:true
since no events are published anyway)user_agent
- The user agent is passed in the header (default:impfbot
)
[COMMON]
zip_code=42042
birthdate=23.06.1912
with_vector=true
[EMAIL]
enable=true
sender[email protected]
user=username
password=xxxxxx
server=smtp.server.de
port=465
receivers[email protected],[email protected],[email protected]
[TELEGRAM]
enable=true
token=TOKEN
chat_ids=123456789,987654321
[WEBBROWSER]
enable=true
[APPRISE]
enable=false
service_uris=discord://webhook_id/webhook_token,matrix://hostname
[ADVANCED]
cooldown_between_requests=60
cooldown_between_failed_requests=10
cooldown_after_ip_ban=10800
cooldown_after_success=900
jitter=5
sleep_at_night=true
user_agent=impfbot
The impfbot helped you and you want to contribute monetarily? Then donate at this fundraiser to Doctors Without Borders. (Yes, somewhat cribbed from vaccipy. But I liked the idea.)
- paulypeter - Telegram Integration, Config-GUI & more