• Stars
    star
    154
  • Rank 241,357 (Top 5 %)
  • Language
    Kotlin
  • License
    The Unlicense
  • Created over 3 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿ’‰๐Ÿค– Bot for the German "ImpfterminService - 116117"

๐Ÿ’‰๐Ÿค– Impf-Bot

Kotlin Java Gradle Selenium

Searches the official "ImpfterminService - Der Patientenservice 116117" for free Corona vaccination slots. It can search multiple locations at once which can be provided in a list. When it finds a free slot, it can use Slack to send you a message. All timings can be configured for your needs and to avoid blocking.

๐Ÿ“ฑ Also the SMS verification step is managed by a Slack bot. Simply write the verification code into the Slack channel:

sms:999-999

โญ Features

ย โญ Full browser automation
ย โญ No API Hacks
ย โญ Telegram integration
ย โญ Slack integration
ย โญ Waiting room detection
ย โญ Customizable by property file
ย โญ Docker support to run it locally or in the cloud

๐Ÿคฉ Thank You

This bot exits and became so useful because of the over 20 people who contributed to this project. That is strength of open-source power ๐Ÿ’ช
zaanposni fabicodes atpanos philib s01iD superflo22 seppi91 alfonsrv schniggie h0nIg Timwun TobseF
So any thanks has to go to all contributors.
If anybody still wants to honor the initial publish you can buy Tobse a choco donut ๐Ÿฉ.

๐Ÿงญ Overview

Sequence Digramm These steps are repeated for every location. So it's no problem to check 14 locations at once. If the bot recognizes that no free slots are available, it waits 30 seconds and goes on to the next location.

โš  Warning: The online booking isn't an authorization

On the booking date you still have to bring the documents with you, to proof that you are qualified to receive the vaccination. Check out the official guidelines and make sure you are qualified for them. This bot doesn't help you get a privilege. It only allows you to get a date without losing the nerves or waisting a lifetime in pointless callcenter calls.

What is Slack and do I need it?

This bot can also work without it. Slack is a messaging application for companies. It is useful to get realtime updates from the bot and to do the SMS verification without the need to be in front of your computer. Otherwise, when the verification starts, you have only 10 minutes left to type the code into the automated browser window. If you take a journey through the dangerous outside world, this may be unpractical. I have chosen Slack, because it proves a nice Java API and it was already running in our company.

๐Ÿ›  Setup

Java

To build and run the bot you need at least a Java 14 installation.

Selenium

The Impf-Bot uses Selenium to automate a webbrowser. Selenium requires a locally installed driver and browser - Chrome is recommended. The download of the chromedriver is done automatically via WebDriverManager.

config.properties

Settings are stored in a config file which is located in: src/main/resources/config.properties.
Edit these settings before the first run. A missing boolean property will be treated as false.

mainPageUrl = https://www.impfterminservice.de/impftermine
# Name of the state from the select list
state = Baden-Wรผrttemberg
# Comma separated list of locations. Optional, if you already have a placement code just add it in square brackets after the place. Since placement codes are not related to locations but to servers you can furthermore optionally specify the related server code next to the placement code in parentheses. The server code can be found in the URL e.g. "001-iz.impfterminservice.de" -> server code == "001".
locations = 69124 Heidelberg[XXXX-XXXX-XXXX](XXX),76137 Karlsruhe

# Birth date, used for age verification (which also changes the available vaccines).
birthDate = 31.12.1994

# Waiting time before checking the next location in seconds [s]
waitingTime = 120
# Waiting time for a manual user interaction in minutes [m]
waitingTimeForUserAction = 15
# Waiting time in Waiting Room in minutes [m]
waitingTimeInWaitingRoom = 15
# Timeout when searching an element on the page in seconds [s]
searchElementTimeout = 16
# Explicit waiting time for browser updates in seconds [s]
waitingTimeForBrowser = 2

# Settings for the request page. Only needed if you set `sendRequest = true`
sendRequest = false
email = [email protected]
# Mobile number for sms verification. Numbers after the "+49"
mobileNumber = 152123123123

# Enabled the Slack messages
slackEnabled = false
# These can be skipped, if Slack is disabled
slackBotApiToken = xoxb-123123123-123123123123123123123123123
slackBotChannel = #random
# Also read the SMS back from a channel. Needs the slackBotChannelReadSms-Name and Id.
readSmsFromSlack = false
slackBotChannelReadSmsName = #smsgameway
slackBotChannelReadSmsId = CE99999PY

# Enabled the Telegram messages
telegramEnabled = false
# These can be skipped, if Telegram is disabled
telegramApiToken = 10000001:AAEMkawDRi5-_yX7fr-pxxxxxxxxx-2EOE
telegramBotUsername = @iufdhsgouihsdfgbot
telegramChatId = 1231231231

# Enabled the Twilio Sendgrid email messages
sendgridEnabled = false
# These can be skipped, if Sendgrid is disabled
sendgridApiToken = SG.aaaaaaaaaaaaaaaaaaaaaa.bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
sendgridEmailFrom = [email protected]
sendgridEmailTo = [email protected]

# Enabled the Gmail email messages
gmailEnabled = false
# These can be skipped, if Gmail is disabled
gmailAppPassword = xxxxxxxxxxxxxxxx
gmailEmailFrom = [email protected]
# Can be the same as the from email
gmailEmailTo = [email protected]

# Enabled the IFTTT notifications
iftttEnabled = false
# These can be skipped, if IFTTT is disabled
iftttApiKey = xxxxxxxxxxxxxxxx
iftttEventName = notify

# Enabled alarm sound.
# Alarm will be played on start and in addition to an enabled notification service.
alarmEnabled = false
# Alarm duration in msec
alarmDuration = 2000
# Tone frequency in hz
alarmFrequency = 800
# Volume in percentage (0.0-1.0)
alarmVolumeInPercentage = 0.5

# Automatically selects the first possible vaccination date and enters all required personal data based on the following values to book this vaccination slot for you.
bookingEnabled = false
# Takes screenshots during booking process to have proof of you booking. (Optional)
takeScreenshots = false
# Defines the path were all screenshots will be stored in (Optional). Files will be prefixed with "impf-bot-"
outputPath = /home
# Personal Data
# Salutation (m=man, w=women, d=divers, c=child)
personalDataSalutation = m
# Firstname
personalDataFirstname = Max
# Lastname
personalDataLastname = Mustermann
# Zipcode
personalDataZipcode = 69124
# City
personalDataCity = Heidelberg
# Street
personalDataStreet = HauptstraรŸe
# House number
personalDataHouseNumber = 911
# Phone number. Numbers after the "+49"
personalDataMobileNumber = 152123123123
# E-Mail
personalDataEmail = [email protected]

# It seems that non windows agents are blocked. You can set it to "default" to use the default one of chrome.
# Could be something like: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36"
userAgent = default

# Clears browser cookies to avoid bot detection. Disabled by default.
clearCookies = false
# Experimental feature, which tries to clear the browser cache to avoid bot detection. Disabled by default.
experimentalClearBrowser = false

Setup Slack

This step is optional. You can find detailed setup instructions here: SlackBot Setup.

Setup Telegram

This step is optional. You can find detailed setup instructions here: TelegramBot Setup.

Setup Gmail

This step is optional. You can find detailed setup instructions here: Gmail Setup.

Setup Ifttt

This step is optional. You can find detailed setup instructions here: Ifttt Setup.

Docker

This step is optional. To run this tool in Docker, follow this tutorial: Docker.

simplelogger.properties

Per default the bot logs only successful bookings.
To change the Log-Level edit the defaultLogLevel:
org.slf4j.simpleLogger.defaultLogLevel = info
| โ„น Change the log level to debug to get a more detailed output during every step.

๐Ÿ”จ Build

gradle build

The build creates runnable Java-fat-jar which contains all dependencies and the config:
build/libs/impf-bot-1.0-SNAPSHOT-all.jar

๐Ÿš€ Start

To run the bot, simply use the gradle command:

gradle run

As an alternative, you can also start it with the fat-jar in the command line by:

java -jar build/libs/impf-bot-1.0-SNAPSHOT-all.jar 

๐Ÿ“œ License

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

For more information, check out unlicense.org

More Repositories

1

boostnote-markdown-cheatsheet

๐Ÿ“‹ ๐Ÿ“˜ The missing one page markdown feature cheat sheet for Boostnote
283
star
2

Candy-Crush-Clone

๐Ÿญ Candy Crush Clone
Kotlin
133
star
3

HitKlack

๐ŸŽฎ Retro console game remake of Mephisto Hit Klack
Kotlin
26
star
4

HitKlack_LibGDX

๐ŸŽฎ Retro console game remake of Mephisto Hit Klack
Kotlin
25
star
5

MagicMaze-Island

๐Ÿ Magic Maze board game clone. Korge Game Jam 2020 contribution.
Kotlin
19
star
6

XSwing-Plus

๐ŸŽฎ XSwing Plus -A Free Open Source Arcade Game Remake
Java
16
star
7

github-plugin-registry-example

GitHub Package Registry template for a maven package
Java
12
star
8

mapstruct-metadata-example

Example setup that uses ASM to provide MapStruct mapping info on runtime
Java
7
star
9

CleanCodeDeveloperJournal

๐Ÿ““ Track your clean code developer progress - Vaadin 14 sample project
Java
6
star
10

Emoji-Font-to-SVG-Extractor

๐Ÿ˜ ๐Ÿ”€ Extract svg or png files for every font symbol
Python
4
star
11

Kotlin-1.4-In-Action

๐Ÿ“š Sources for my Kotlin 1.3 Presentation
Kotlin
4
star
12

exit-game-bomb-app

๐Ÿ’ฃโฐ Bomb App for an Exit Game
Kotlin
3
star
13

RoguyIsleMaze-Server

WebSocket Game Server for RoguyIsleMaze
Kotlin
3
star
14

stackoverflow-badge

๐ŸŽซ Stack Overflow SVG-Flair Badge Generator
JavaScript
3
star
15

Playnite-Library-Minifier

๐Ÿ—œ Minifies a Playnite game database
Kotlin
2
star
16

KoJaMatchUp

๐ŸŽฎ Multiplayer match up game
Kotlin
2
star
17

TopsyIcons

๐Ÿฑโ€๐Ÿ‰ HDIP redesigned flat icons for some tools
HTML
1
star
18

intellij-launcher

Kotlin script that launches the latest installed IntelliJ with a specified project
Kotlin
1
star
19

Citty-Escape-Karlsruhe

๐Ÿ”๐Ÿˆ Search your lost cat in Karlsruhe - A Scotland Yard board game adaption
Kotlin
1
star
20

IntelliJ-Launcher-n

๐Ÿš€Native Kotlin tool that launches the latest installed IntelliJ
Kotlin
1
star
21

Hospital

๐Ÿš‘ Arcade game - My very first video game
Java
1
star
22

i18n-formatter-intellij-plugin

๐Ÿ›  A plugin for Intellij IDEA which formats a message.Properties file
Java
1
star
23

eTicketAppMockup

๐Ÿ˜ A mockup UI of the eTicket Karlsruhe App
JavaScript
1
star
24

Arduino-Countdown-Timer

โฒ Countdown timer for Arduino and the SparkFun 7-Segment Serial Display controlled by REST
C++
1
star
25

lueck-spare-part-3d-model

๐Ÿฆพ Spare part 3D model for a the Steck LรœCK kids game
Python
1
star
26

the-tree

๐ŸŒณ The Tree - Sample game project for Kotlin KorGE talk
Kotlin
1
star
27

HotClack

๐ŸŽฎ My Global Game Jam 2017 Summit. 2D Arcade Game written with Kotlin and LibGDX
Kotlin
1
star
28

intellij-keyboard-fix

โŒจ โœ” Fixes the IntelliJ Bug on `extract method` by removing letter `ยต`
1
star
29

KotlinJsGameWishlist

Kotlin JS sample project which shows a Steam game wishlist
Kotlin
1
star
30

jce-chocolatey-package

Chocolatey package for the JCE (Unlimited Strength Java Cryptography Extension Policy Files)
1
star
31

PhraseAppPropSort

๐Ÿ›  Property sorting and formatting with the PhraseApp style
Kotlin
1
star