Feedback & Feature Requests
alfonsrv opened this issue · 101 comments
Feature Requests
To avoid cluttering the issue tracker with feature requests, please comment any requests here and we'll keep a list.
When available, I've linked a related issue or comment to add context to the request.
Emoji Feedback Scale
Emoji | Feedback |
---|---|
🚀 | Successfully booked an appointment |
🎉 | Successfully booked two or more appointments |
Helped you? Support this project!
😕
Zulip (Or slack/telegram) setup guide
@BurgerKing2k19 I added a setup guide at ALERT.md
😕
Doing everything as described but cmd throws "Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.".
Since I am a beginner every try to fix it was unsuccessful.
Tried adding Path to Environment Variables and switching off App Execution Aliases.
No you didn't 😛 You have a couple of options:
- Follow the INSTALL.md, completely reinstalling Python
- Delete the
python.exe
andpython3.exe
in%LocalAppData%\Microsoft\WindowsApps
- Remove the
%LocalAppData%\Microsoft\WindowsApps
from the Environment variables as higher up in the hierarchy than the one you added manually.
429 all the time. With or without concurrent, i INSTANTLY get 429.
Is this even working for more than 1 Location?
@AmansRevenger yup – works just fine. This issue is not the place for your frustration. Would appreciate it if you created a new issue instead if you feel like you're not the only one experiencing this.
You cannot do anything against 429
except wait and not avoid running in Docker environments.
I may be to unskilled to use a bot. I followed your instructions and got this message on my mac:
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see pypa/pip#5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Usage:
pip3 install [options] [package-index-options] ...
pip3 install [options] -r [package-index-options] ...
pip3 install [options] [-e] ...
pip3 install [options] [-e] ...
pip3 install [options] <archive url/path> ...
no such option: --iser
Traceback (most recent call last):
File "main.py", line 10, in
from impf.alert import send_alert
File "/Users/kimalexanderwendt/Downloads/impf-botpy/impf/alert.py", line 8, in
from impf.constructors import zulip_client, zulip_send_payload, zulip_read_payload, get_command
File "/Users/kimalexanderwendt/Downloads/impf-botpy/impf/constructors.py", line 8, in
from selenium.webdriver.chrome.options import Options
ModuleNotFoundError: No module named 'selenium'
Any help appreciated...
@boeing747430 can you try running python3 -m pip install -r requirements.txt --user
and see if that fixes it for you?
Now it opens chrome on the impfterminservice.de website, but there it opens with the Bundesland selection. Will it still give me alerts without me selecting anything there?
Also, I am not sure waht to do exactly in order to test the alerts.
Sorry, but I appreciate your help very much.🙂
@boeing747430 don't worry. :) It should choose a Bundesland and keep on navigating by itself. If it didn't choose one, you likely have a BUNDESLAND
set in settings.py
that is not listed. Can you check? Watch out for spaces in the string.
You can test your alerts using python3 main.py --alerts
– as specified in the README.md on the main page.
Seems to work now - thanks so much.
You cannot do anything against 429 except wait and not avoid running in Docker environments.
What exactly do you mean ? "not avoid" ... is using docker not recommened? If yes, why?
@AmansRevenger as mentioned in DOCKER.md things might break when using concurrency. I'm not sure why, but I also only keep on getting 429
errors in Docker environments until I have successfully authenticated with a Vermittlungscode manually (works for some reason). After that it can monitor for new appointments flawlessly, but it seems like everything else doesn't work in Docker environments.
A variety of things might be wrong here – e.g. we have to use --no-sandbox
switch to get Chrome to start in the first place. I haven't investigated as Docker only benefits a very small margin of people and as it's likely an abuse-factor anyways. Happy about pull requests though, if you have time to debug it.
Any tips ? I have tried setting the SELENIUM_PATH as well, but as you can see, I can run it as is from a CMD ...
EDIT: nvm, fixed it by deleting the settings.SELENIUM_PATH argument in impf/browser.py , line 38.
must have messed up the var somehow. Or the example settings is weird / non empty idk. Thanks anyway ;)
@AmansRevenger top – lemme know if you encounter any issues
Brilliant bot, switched from my self developed (noob level) Selenium script to your bot. 2 topics that might be useful to add:
- Clear cache, maybe if shadowbanned? I don't know if this helps anything...
- Receive Telegram chats. With the getUpdates Telegram API you get also the chat history. In my case, I used one bot for 1 message and just grabbed the last message text. But I guess iterating through all messages would work too.
In the meantime, I booked an appointment with my self developed script, but I will recommend yours to all colleagues and friends 👍🏽
Hey @ChrizZz90, thanks for the feedback – always much appreciated!
Do you think you could integrate your Telegram receive function in this project? Would be great! I think the last message should be enough, or maybe if it's filterable just the messages of the last 120s as I'm doing it with the Zulip messages. Just make a Pull request if you are so inclined. :)
Alfons
#Receive Chatupdates update_url = 'https://api.telegram.org/bot' + bot_token + '/getUpdates?chat_id=' + bot_chatID chat_update = requests.get(update_url) chat_json = json.loads(chat_update.text) last = len(chat_json['result']) last = last - 1 pin = chat_json['result'][last]['message']['text'] pin_input = driver.find_element_by_xpath("//input[@formcontrolname='pin']") pin_input.send_keys(pin)
I think only adding it wouldn't work. This is my script for adding the SMS Pin. But you need to know to write only the PIN. Maybe working with a one time code would work? Or just if Telegram enabled select the first appointment and book it automated.
Alright. Wanted to avoid downloading this app; but added full Telegram support 👍
Your code snippet was very helpful, thanks!
Hi, very useful app.
A couple of feature requests:
- Flag to skip to the next location if landed into the waiting room.
- Kind of best practices to avoid the 429 error: does the order of servers play any role, what is the minimal request interval and so on. What I checked up to now: with single browser window 1 minute WAIT_LOCATIONS is too low, 2 minutes seem ok.
Hey @starykov thanks for your feature requests. While I understand how such a setting could seem beneficial first glance, it will actually likely result in more shadow bans, which is why I left it out. The settings.sample.py
is pre-configured of what I believe is a best-practice configuration for most people. If you feel otherwise you could e.g. start an Issue discussing such configuration.
Hi,
thanks for your work.
Regarding Telegram support: you should add a
if not _message is None:
in alert.py line 115; not all telegram results contain a message
@Maik7 thanks for the pointer. Don't really use Telegram as mentioned – only happens when you didn't text your bot before I assume?
@alfonsrv I had the situation tonight that the bot found available appointments but without my feedback, it exited. Is it possible to book the appointment in any case or a fallback if feedback is missing? Maybe as a settings configuration? (Maybe something like this is already implemented. In my case, my script booked the slot during the waiting time of the bot).
Seems like that also during the night (and in the potential sleep period) appointments are available.
Also, I want to share my delete cache code. I don't know if it helps, but it might be usable.
def delete_cache():
driver.execute_script("window.open('');")
sleep(2)
driver.switch_to.window(driver.window_handles[-1])
sleep(2)
driver.get('chrome://settings/clearBrowserData') # for old chromedriver versions use cleardriverData
sleep(2)
actions = ActionChains(driver)
actions.send_keys(Keys.TAB * 3 + Keys.DOWN * 3) # send right combination
actions.perform()
sleep(2)
actions = ActionChains(driver)
actions.send_keys(Keys.TAB * 4 + Keys.ENTER) # confirm
actions.perform()
sleep(5) # wait some time to finish
driver.quit() # close this tab
driver.switch_to.window(driver.window_handles[0]) # switch back
@Maik7 thanks!
@ChrizZz90 although technically possible, booking appointments automatically is not in the spirit. Human interaction should always be required to avoid appointments being booked accidentally e.g. the next day at 8am and the user not knowing about it, resulting in appointments not being attended.
Cache cleaning function is interesting – not sure where we could use it though.
I used cache cleaning first after opening a browser window every time, on a later stage I reduced it and I call it if I am shadowbanned.
Appointments are scheduled at least 24h before, every appointment later is directly handed to the center itself and they use people on their waiting list. This is probably a human process with issues and mistakes, but I can confirm that it never happened to get an appointment in less then 24 hours. Do you have other experiences?
Hey @ChrizZz90, that's not true – appointments can also appear the day before, with the appointment being literally the next morning. Had it happen to me too; got one on Sunday for Monday at 0830.
Interesting. Did cache clearing have a positive impact? I honestly think cookies need to have a certain age for everything to work better, but may be a wrong feeling. Instead we could also use incognito
sessions.
Wow, damn, I thought they would stick to their rules.
I don't know if it has an impact. Tests are influenced by the waiting list and other scripts I am running. Clearing the cache just gives me a positive feeling that I did everything to solve it.
Ich bekomme die Fehlermeldung
ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly
Any Ideas? Arbeite mit MacOS 11.2.3, falls das wichtig ist - Super Teil und Idee jedenfalls!
@grimconquerer einfach noch mal pip
drüberlaufen lassen. Sollte einfach funktionieren. BR
I have been trying to book an appointment with an existing Vermittlungscode. I have now encountered the same issue twice, where I have an appointment show up, I fill everything out, click to confirm the appointment, but then the website tells me that the appointment is already taken, even though it is still within my reservation period.
Has anybody else encountered that problem or have an explanation?
with todays improvements I get on win10 a chrome error: "Google Chrome kann I'm folgenden Datenverzeichnis weder lessen noch schreiben: selenium." Any hint on how to solve it?
I also get selenium.common.exceptions.WebDriverException: Message: unknown error: DevToolsActivePort file doesn't exist
I have been trying to book an appointment with an existing Vermittlungscode. I have now encountered the same issue twice, where I have an appointment show up, I fill everything out, click to confirm the appointment, but then the website tells me that the appointment is already taken, even though it is still within my reservation period.
Has anybody else encountered that problem or have an explanation?
Had the same today, I thought this is caused by the impfterminservice platform.
@marcoreuter this issue is caused by the ImpfterminService – unfortunately they sometimes send the same appointment out to two people at the same time. Nothing we can really do about it. Don't worry, tomorrow is another day.
@ChrizZz90 can you open constructors.py
and replace the line opts.add_argument('--user-data-dir=selenium')
with opts.add_argument('--user-data-dir=./selenium')
and see if that fixes it for you? Thanks for reporting this
@alfonsrv that doesn't solve the issue. Commenting this line out lets me start Selenium, but I get missing cookies errors.
Using the chrome default path works for me. Is Chrome not allowed to write in other directories?
@ChrizZz90 should be fixed now. Just pushed a commit. BR
You've added readline in your code. Now the impfbot fails to launch with
Traceback (most recent call last): File "C:\Users\XXX\Desktop\impf-botpy\main.py", line 7, in <module> import readline ModuleNotFoundError: No module named 'readline'
You should probably add pyreadline to your requirements.txt. I have fixed it with:
pip3 install pyreadline --user
@bguenthner cheers for the heads-up.
First of all, thank you very much for the project!!
I have the problem with BOOK_REMOTLEY that the second alert with the appointments is not send to telegram:
fappointments = format_appointments(appointments.get('termine'))
send_alert(settings.ALERT_BOOKINGS.replace('{{ APPOINTMENTS }}', ' \n'.join(fappointments)))
I tested it calling send_alert() with a simple string twice and it worked perfectly. When I add the original code with a dummy appointment string to the second call it does not arrive in the telegram chat.
Any ideas?
Either a rate limiting issue on the side of Telegram or the API simply does not return any appointments in your case. But that's why the link is usually appended to the alert & a recommendation to setup a remote access tool such as AnyDesk
.
I accessed the machine via TeamViewer
and the log always showed a valid appointment as well as the website. Could it be invalid formatting?
Edit: Okay I found it, it is invalid formatting. Telegram does not seem to like the *
in front of the appointments listing:
f'* {_format_appointments(appointment)} (appt:{i + 1})'
What would be a preferred other symbol for the listing? -
How does the automatic booking work, do I need to enter appt:1
as answer in the chat? Because when I click the appoints request link it won't work, the server probbably sees a different IP and directly kills the reservation.
@ratatonga - the link does not always work first try; just keep on trying. Didn't get consistent results either, but when it works it's pretty satisfying. You should be able to answer appt:1
in chat and then the appointment should be booked given your credentials, but here too success is not guaranteed. I'm just building backups.
Telegram is fine with the **Verfügbare Termine**
?
@ratatonga - the link does not always work first try; just keep on trying. Didn't get consistent results either, but when it works it's pretty satisfying. You should be able to answer
appt:1
in chat and then the appointment should be booked given your credentials, but here too success is not guaranteed. I'm just building backups.
Telegram is fine with the**Verfügbare Termine**
?
It's not that one, it's the one in the listing:
2021-05-26 13:26:19,846 - [INFO] <impf.alert.alert.py:63> Sending alert " **Verf�gbare Termine:**
* Do, 27.05.2021 - 17:48 Uhr x Do, 08.07.2021 - 13:30 Uhr (appt:1)"
Also the **
has no effect.
Works with -
? I think -
should also be ok for most Markdown parsers, so a switch would be easily possible.
Works with
-
? I think-
should also be ok for most Markdown parsers, so a switch would be easily possible.
Works =)
good catch!
Maybe its the * as the first character of a line?
'text': message.replace('* ','- ')
could do the job within telegram_send could be an easy fix?
just found this: Telegram's versions of MarkDown: Markdown & Markdown v2 don't support any sort of lists...
@Maik7 so -
s don't work either? That's a bit lame, but oh well I mean it's Telegram. Can remove the list markers for Telegram if –
(longer hyphen) won't work either
If I directly do send_alert('\n\n- test')
this will arrive in Telegram. So I guess the standard minus -
works.
it seems telegram support only one kind of bold, bold, and bold results in same formatting
I have another problem, not sure about that one. I am running KEEP_BROWSER
True with CONCURRENT_ENABLED
True, because it will kill the browser if I don't set it.
main.py
impf_me()
line 100 if not x.keep_browser: x.driver.quit()
If KEEP_BROWSER
is False it will reopen (?) the window and then normally you are stuck in the waiting room again.
Problem now is, if there is an appointment, but you do not react within WAIT_SMS_MANUAL
time, it will somehow open a new window but keep the one with the appointment. Interestingly it kills another window and there are CONCURRENT_WORKERS-1
browser windows left. Quite strange behaviour.
@ratatonga when an appointment is found the bot is geared towards maximum reliability in order to not accidentally jeopardize it. The other part is, that the bot's job is considered done, once an appointment is found. That results in the bot simply decommissioning the worker entirely and keeping the window open indefinitely without restarting.
tl;dr: This is the intended behavior.
Nur als kleiner Hinweis weil ich gesehen habe, dass du den 429 Statuscode etwas über einen Umweg erkennst.
Wenn du Seleniumwire statt Selenium benutzt kannst du die rohen HTTP requests alle auslesen.
Geht eigentlich recht easy
from seleniumwire import webdriver
anstatt from selenium import webdriver
, dann ganz normal driver = webdriver.Chrome()
und dann hast du eine Liste driver.requests
in der alle requests mit status_code und url Attribut (zum richtigen Request finden) vorhanden sind
@philipphu hast recht – ist n guter Hinweis. Hab mir schon paar mal überlegt selenium-wire
anstatt selenium
zu verwenden. Auch um paar Requests dynamisch zur Laufzeit abändern zu können und effektiv das Vermittlungscode-Portal zu umgehen. Hatte bisher nur Bedenken aufgrund der zusätzlichen externen Dependencies und den Switch im Bot Life-Cycle, der dazu führen könnte dass bisherige – technisch weniger versierte – Nutzer ggf. nicht verstehen, dass sie ihre pip
Pakete updaten müssen.
Aber werde das wohl dieses Wochenende angehen, um n saubereren Prozess zu haben. 👍 Cheers für den Input
@alfonsrv wenn die Angst da groß ist wegen den technisch weniger versierten Usern: Ich würde vorschlagen, dann mal damit anzufangen mit Tags und einem Changelog zu arbeiten und die Leute da direkt darauf hinzuweisen, dass man z.B. von 0.44 --> 0.45 einen kleinen Migrationsschritt machen muss und z.B. nochmal pip3 install -r requirements.txt
ausführen muss.
Kann das schon verstehen, net jeder blickt bei so einem Fehler wie neulich mit dem readline, dass da irgendwo ein pip Paket fehlt. Also das wäre zumindest meine Idee, das Ganze etwas verständlicher für nicht ITler zu machen....
Was mega toll wäre: Ein Weg die settings.py zu migrieren, weil da bin ich jetzt schon 2x reingelaufen beim updaten per git pull...
@bguenther cheers fürs Feedback – an sich gute Idee; aber hast n Ansatz wie wir das technisch gut migrieren? Würde ungern eine der folgenden Dinge machen:
- settings.py automatisiert via
GET-request
dersettings.sample.py
RAW, um fehlende Attribute in der lokalensettings.py
ergänzen lassen - fehlende Attribute in Funktion hinterlegen und vor Laufzeit prüfen lassen, da doppelte Pflege & fehleranfällig
@alfonsrv erstmal dank dir für den Bot - richtige Erleichterung bei der Suche!
Hätte n' Feature Request. Da ich für mehrere Zentren zugleich suche, wäre es vllt ganz cool Chrome im Headless Mode zu starten, also im Hintergrund ohne Chrome Browser GUI. Bei Mac ist direkt die Leiste voll und die Browser drängen sich immer vor meine aktuellen Fenster wenn sie sich öffnen. Hatte mich schon an den Code gewagt gewagt, aber bekomm es leider nicht ganz zum Laufen. Gerade wenn man am Rechner nebenbei arbeitet, wäre das richtig nice!
@marvellectric – hehe cheers fürs Feedback. Headless hat das Problem, dass man nicht eingreifen kann. Die Eingabe Remote sollte nur n Nice-to-Have Fallback sein – gibt aber keine Garantie, dass das läuft, da die kleinste Formular-Anpassung den ganzen Workflow zerschießen kann. Um die allgemeinen anklagenden Issues von wegen "eigentlich hätte ich n Termin, aber Browser war Headless und Remote-Input hat nicht funktioniert" zu vermeiden, habe ich davon abgesehen.
Wenn du deine Browser unter Beachtung des o.g. Disclaimers Headless starten willst, einfach opts.add_argument('--headless')
(aus'm Gedächtnis) in chrome_options
in impf/constructor.py
hinzufügen.
Ich benutze --headless
in Verbindung mit --remote-debugging-port=9222
; damit kann man unter http://localhost:9222 auf den browser zugreifen.
Dafür habe ich den Code wie folgt angepasst (nur mit meiner config getestet):
diff --git a/impf/browser.py b/impf/browser.py
index b79ed6e..e432059 100644
--- a/impf/browser.py
+++ b/impf/browser.py
@@ -32,9 +32,15 @@ class Browser:
keep_browser: bool = False # Helper variable to indicate whether or not to keep browser open for reuse
error_counter: int = 0 # Helper variable to avoid infinite loop
logger: logger = field(init=False) # Internal adapter-logger to add PLZ field
+ headless: bool = False
+ debug_port: int = 9222
def __post_init__(self):
opts = browser_options()
+ if self.headless:
+ opts.add_argument("--headless")
+ if self.debug_port:
+ opts.add_argument(f'--remote-debugging-port={self.debug_port}')
if settings.SELENIUM_PATH:
self.driver = webdriver.Chrome(settings.SELENIUM_PATH, options=opts)
else:
@@ -56,6 +62,8 @@ class Browser:
Browser with new data - sorry """
self.location = kwargs.get('location')
self.code = kwargs.get('code')
+ self.headless = kwargs.get('headless')
+ self.debug_port = kwargs.get('debug_port')
self.error_counter = 0
self.location_full = ''
self.logger = settings.LocationAdapter(logger, {'location': self.location[:5]})
diff --git a/main.py b/main.py
index 0bc09b1..6126398 100644
--- a/main.py
+++ b/main.py
@@ -98,7 +98,7 @@ def impf_me(location: dict):
f'before checking the next location')
sleep(settings.WAIT_LOCATIONS)
if not x.keep_browser: x.driver.quit()
- return {'location': x.location, 'code': x.code}
+ return {'location': x.location, 'code': x.code, 'headless': x.headless, 'debug_port': x.debug_port}
if __name__ == '__main__':
In der config kann man dann wie folgt den headless modus einschalten:
LOCATIONS: List[Dict[str, str]] = [
{
'location': '70174 Stuttgart',
'code': '',
'headless': True,
'debug_port': 9222,
},
]
@alfonsrv Genau, daher habe ich für jede location einen (eindeutigen) Port in der config.
@alfonsrv dank dir für die flotte Antwort. --headless hatte ich versucht, allerdings hatte ich wohl was im Skript zerschossen weswegen es nie ausgeführt wurde. Nachdem ich das Skript neugeladen hatte ging's dann. Die Problematik mit dem Eingreifen versteh ich allerdings, sofern im Headless Mode auch keine logs im Terminal stattfinden.
Ich versuch's mal noch mit der Zusatzlösung von @lhofmann.
Danke euch beiden!
Thanks for your work! impf-botpy worked fine, gave more useful feedback than TobseF/impf-bot (also a cool project) and detected when too many requests were done.
Excellent job!
Hi, thank you for developing this bot. It will definitely help me (and others of course) a lot this summer.
An off-topic question if anyone knows something about this:
Since the priority limits on who can receive a vaccine will be removed from June 7 and currently (in BW) it is even hard to get a Vermittlungscode, I'm wondering, as someone who isn't eligible for vaccines at the moment, if I should get myself a Vermittlungscode in advance to be quicker, or after June 7.
In short: Will there be a difference for somebody who isn't eligible for vaccines right now to get a Vermittlungscode right now and use it to get an appointment after June 7? Has the Vermittlungscode a connection with the date I get it?
Again, appreciate all your effort!
Managed to book an appointment, so first of all: thanks!! 🙏🏻
However, the remote booking (which I've set to just immediately book the first appt after 5secs in my fork) failed with this stack trace – is this a known issue?
@jonaskuske this is the intended behavior if the server does not return the appointments properly. Even though it works quite reliably for me, it's not unheard of.
PS: Würde den Vermittlungscode vllt noch schwärzen – ansonsten können jetzt alle hier deinen Termin verwalten / absagen.
Quick question: Is it somehow possible to verify if the personal data is entered correctly when booking an appointment via telegram (i.e. via appt:1) ?
@congoelmex no. But if it was entered incorrectly you wouldn't get a booking confirmation in the first place.
@alfonsrv I'm a litte bit confused. Is the "Vermittlungscode-Generator" now dead or was it just the change from age to date format? And to answer your last question: No I am currently not aware of any good way to migrate the settings.py.
@bguenthner still works. Just age to birthdate.
Hey,
thanks for creating the bot. I am currently not sure if the bot is looking for all 3 Impfzentren I put into the config. Only one is currently being logged (the one where I had a Vermittlungscode) and only one tab is currently opened in tjhe Selenium-Browser.
Am I doing something wrong?
Cheers
Hey, thanks for the bot, I did successfully manage to set it up in almost no time without a lot of Python and Selenium experience.
Similar question to @PadPlay above...: #1 (comment)
We were lucky enough to receive 2 Vermittlungscodes, one for each of the Stuttgart locations.
Now I thought the bot would check the locations one after the other, switching between Liederhalle and Robert-Bosch Krankenhaus. However, it always ends up only checking the last in the list of locations from settings.py
Anything I am missing...?
Hey @mbhochstetter,
since the author didn't reply, I looked up a solution myself. I turned on the "multi-window-feature" (set CONCURRENT_ENABLED to true) and it just opens more than one window. Not the best solution imo but it works.
Cheers
Hey, thanks for the bot, I did successfully manage to set it up in almost no time without a lot of Python and Selenium experience.
Similar question to @PadPlay above...: #1 (comment)
We were lucky enough to receive 2 Vermittlungscodes, one for each of the Stuttgart locations.
Now I thought the bot would check the locations one after the other, switching between Liederhalle and Robert-Bosch Krankenhaus. However, it always ends up only checking the last in the list of locations from settings.py
Anything I am missing...?
Hi,
intended behavior. :-)
Just change
RESCAN_APPOINTMENT: bool = True
to
RESCAN_APPOINTMENT: bool = False
in settings.py
Thank you very much for this app. It worked great!
Hi zusammen, der Bot läuft nun mittlerweile seit 5 Tagen durchgehend, hat leider noch keinen Termin gefunden.
Auf Impfterminübersicht zeigt es aber an, dass Termine eingestellt wurden.
Kann es sein, dass die 2 Minuten Crawlzeit zu hoch eingestellt ist?
@grumpyp Es kann auch sein dass die Nachfrage so groß ist, dass man mit nur einem Bot wenige Chancen hat. Vielleicht muß man Glück haben, und die richtige Millisekunde erwischen?
Nur eine Vermutung. Vielleicht hat sich tatsächlich was am Server geändert.
Letzten Termin habe ich am Freitag, für Samstag bekommen. Seitdem nichts.
@grumpyp Es kann auch sein dass die Nachfrage so groß ist, dass man mit nur einem Bot wenige Chancen hat. Vielleicht muß man Glück haben, und die richtige Millisekunde erwischen?
Nur eine Vermutung. Vielleicht hat sich tatsächlich was am Server geändert.
Letzten Termin habe ich am Freitag, für Samstag bekommen. Seitdem nichts.
Gut dann warte ich weiterhin einfach ab und hoffe ich habe Glück!
@grumpyp 10 Minuten nach meinem Kommentar kam die Alarm: ich habe einen Termin für nächste Woche Dienstag bekommen, mit der letzten Version von impf-botpy.
Vermittlungscode habe ich heute Nacht mit python main.py --code
um 02:30 bekommen. Mit der normalen Methode hat es seit 4 oder 5 Tagen bei mir nicht funktioniert.
Danke nochmal, @alfonsrv !
Vielen Dank für den Bot. Hatte aber leider kein Glück bei der Terminfindung. Läuft nun seit einigen Tagen durchgehend, aber bis jetzt nur einen Vermittlungscode generiert und dazu bisher keinen Termin.
Der Bot läuft jetzt seit 5 Uhr morgens mit python main.py --code
. Leider hat es mit den Vermittlungscodes trotzdem nicht geklappt, sondern erhalte weiterhin No vacancy right now...
. Ich war der Annahme, dass die Generierung der Vermittlungscodes in den Morgenstunden on-demand wäre oder liege ich falsch?
Das hier ist Feedback & Feature Requests. Alle, die nicht aus eigenem Antrieb die Einstellungen ändern bzw. ausprobieren können hier entlang: Comprehensive Guide to Getting Appointments for Dummies
Cool project! :)
Is there a possibility for the chrome windows to be opened minimized or at least in the background, so it doesn't interfere while working.
@n14s has been answered previously. #1 (comment)
Successfully got an appointment (semi-automatic mode without chat client integration) after a bit over 1.5 days (really a life saver!).
Appears that getting Vermittlungscodes is limited to 3 per server. Got 2 successfully a day ago and after requesting another one last night it refused all further requests with Sorry, didn't mean to spread rumors about limits which aren't true. Yesterday it really looked this way, Today I could get more Vermittlungscodes without trouble. So it just needs patience, even if the error message sounds like a certain phone number and email address reached a permanent limit.API: Error from backend: [-1] Maximum requests reached for phone number and email
. Which should be better phrased "or", because changing email didn't help. Couldn't try with different phone number in the middle of the night.
Appears that getting Vermittlungscodes is limited to 3 per server. Got 2 successfully a day ago and after requesting another one last night it refused all further requests with
API: Error from backend: [-1] Maximum requests reached for phone number and email
. Which should be better phrased "or", because changing email didn't help. Couldn't try with different phone number in the middle of the night.
Not sure about that limit. I have way more than 3 codes on the same email & phone number & server combination. Although I was mostly active until a couple weeks ago. I did sometimes receive errors when trying to get codes with the same mail & phone combination too fast. But it definitely was not after 2 codes and after a little bit of "cool down" or switching the phone number it wasn't a problem anymore.
@alfonsrv Great tool! Thanks for taking the time to create impf-botpy. You may want to use argparse
's version
action instead of rolling your own.
Line 114 in 995ffcf
Succesfully booked.
🚀
some modifications I made though (too hacky for a MR but very simple nevertheless):
- if only one appointment slot is offered, don't ask the user which one he wants, just book it immediately
- next to some sms backends, also support reading the code from the terminal window. typing a 1 on my keyboard is way faster than typing appt:1 on my phone
great app though, never would have gotten my appointment without it. still baffling as to why the oss community has to come up with an outfoxed polling solution instead of someone just creating a good old waiting list...
I am using Ubuntu. When I enable CONCURRENT_ENABLED = True
, I get the below error and the chrome is having address as data:,
(see the screenshot - just added incase if it helps you to debug the issue)
This is the error
selenium.common.exceptions.WebDriverException: Message: unknown error: DevToolsActivePort file doesn't exist
@d-t-o I've done the same modification. Be aware, though: my bot answered too fast with "appt:1", and I only got 429 from the server, even after adding sleep(15). It was too late to manually book the appointment, then.
It would be nice if the bot automatically picked the first appointment, and filled everything in the online form, without clicking on "Confirm". The user could check everything's fine, and then confirm, not too fast and not too slow. :D
Could it be that the server can somehow tell the difference between booking via the online interface and via impfbot-py?
Yay, thank you so much for creating this neat little bot ^_^
My setup: Old laptop revived with Ubuntu 18.04; 2GB RAM
My need: Vermittlungscodes and appointment; two vaccination centres within reach
My experience:
First attempt crashed with "missing module dataclasses". Fixed by installing the dataclasses module, maybe just add that one to requirements.txt.
Next I set up the Telegram hook, which worked like a charm, thanks to the clear tutorial.
Ran main.py --code
first, each time only storing one of the two locations in settings.py. Received codes without any issue. Manually trying out the codes first led to an unspecified error on the website. This seems to have been a serverside problem though, disappeared a couple of hours later. Then ran main.py
with both locations and CONCURRENT_ENABLED=True and CONCURRENT_WORKERS=2. I had WAIT_RESCAN_APPOINTMENTS=60*4 because I feel checking every 2min is excessive (and if all of us did it, the server would overload even quicker than it already does).
From then it was just waiting.
The bot needed manual help twice. One or both concurrent workers lost touch with their Chromium session, and the automatic reset didn't reestablish it. Manually closing the browser was enough to fix it though, the bot restarted the browser on its next loop and continued working fine. Maybe the log below is helpful in some way.
Got a ping on telegram at 7.50am two days later, browser window left open for me with 7min remaining to book my appointment. Win :D
Log from the bot's random desynching:
2021-06-09 18:40:28,802 - [INFO] <impf.browser.browser.py:520> 69123: Rechecking for new appointments
2021-06-09 18:40:28,845 - [ERROR] <impf.browser.decorators.py:73> 69123: AssertionError occurred in <control_appointment>. This usually happens if your computer/internet connection is slow or if the ImpfterminService site changed.
2021-06-09 18:40:28,845 - [ERROR] <impf.browser.decorators.py:75> 69123: Sleeping for 120s before continuing, giving the user the ability to interact before attempting to revover automatically...
2021-06-09 18:42:28,969 - [INFO] <impf.browser.browser.py:539> 69123: Current page title is "<selenium.webdriver.remote.webelement.WebElement (session="e52b61dc[more digits]21351968f", element="12990296-d4f9-4a90-a048-c962f66854c6")>"
2021-06-09 18:42:29,054 - [INFO] <impf.browser.browser.py:559> 69123: Continuing with reset via <control_main>
2021-06-09 18:42:36,522 - [INFO] <impf.browser.browser.py:459> 69123: Connected to server [002]
2021-06-09 18:42:36,639 - [ERROR] <impf.browser.decorators.py:73> 69123: AssertionError occurred in <control_main>. This usually happens if your computer/internet connection is slow or if the ImpfterminService site changed.
2021-06-09 18:42:36,639 - [ERROR] <impf.browser.decorators.py:75> 69123: Sleeping for 120s before continuing, giving the user the ability to interact before attempting to revover automatically...
Today I have successfully booked two appointments.
One thread with only one test center.
Can someone confirm the docker wrapper version is recently functional? I am trying to get an appointment / code on 4 centers since two days to no avail at all. Also, could you please add more detail to
I highly recommend helping the bot getting to the appointment booking screen manually
in main/docs/DOCKER.md
as I don't fully get what is meant by that. Visually everything looks good on VNC, the bot is clicking the correct buttons etc. Still I guess I might miss something.
Very nice, could get an appointment at Robert Bosch Krankenhaus after a few hours.
The first one was already taken after I entered my personal data manually (guess I was too slow).
Getting the Vermittlungscodes was much faster than the actual appointment.
There was error 429 occasionally but after waiting a while it worked again.
I used 2 concurrent threads on a windows PC (not using the remote function).
@janosh – guess there's always something you don't know about in Python, heh. Thanks for the pointer.
Not exactly a bug, but one thing I noticed: Don't use custom city-names in settings.py after the ZIP-code. For example I wrote "70376 Robert-Bosch". This led to impfbot skipping this Impfzentrum altogether.
2021-06-21 07:15:26,350 - [INFO] <impf.browser.browser.py:174> 70376: Navigating to ImpfterminService
2021-06-21 07:15:28,532 - [INFO] <impf.browser.browser.py:187> 70376: Selected Bundesland: Baden-Württemberg
2021-06-21 07:15:38,738 - [INFO] <__main__.main.py:108> Waiting until 07:20:38 before checking the next location
As soon as I renamed it to 70376 Stuttgart, it worked.