lk3de / impftermin-checker Goto Github PK
View Code? Open in Web Editor NEWSearch Impftermine and Vermittlungscodes in Germany automatically
License: GNU General Public License v3.0
Search Impftermine and Vermittlungscodes in Germany automatically
License: GNU General Public License v3.0
I don't have the exact stacktrace anymore, but you can easily find them via stackoverflow:
playsound complains about not being able to load the module AppKit
, which is part of PyObjC
, so adding that to the pip install line on macOS is crucial
Hello - love this project!
While running the project manually, it worked flawlessly - however when I tried to manage it via PM2, I started to run into issues. (Ran on a VM and my desktop)
The error code was the following:
Traceback (most recent call last):
File "C:\Python39\lib\site-packages\selenium\webdriver\common\service.py", line 72, in start
self.process = subprocess.Popen(cmd, env=self.env,
File "C:\Python39\lib\subprocess.py", line 947, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Python39\lib\subprocess.py", line 1416, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Impfterminchecker\impftermin_checker.py", line 280, in <module>
driver = webdriver.Firefox(options=options, firefox_profile=profile)
File "C:\Python39\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 164, in __init__
self.service.start()
File "C:\Python39\lib\site-packages\selenium\webdriver\common\service.py", line 81, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
As this only happened in PM2 and PyCharm, I started digging around and found a fix (for windows at least): You need to define the geckodriver executable variable directly (set the parameter executable_path
when declaring the webdriver) and ideally have geckodriver inside the project to avoid permission issues.
I have implemented this in my fork and can merge it into your repository, if you wish.
I keep receiving this error and am not sure how to proceed.
Unerwarteter Fehler ist 1x aufgetreten, breche ab.
Traceback (most recent call last):
File "/Users/user/dev/impftermin-checker/impftermin_checker.py", line 80, in <module>
waiting_time_dataset = config['waiting_time_between_each_dataset'] + randrange(5)
KeyError: 'waiting_time_between_each_dataset'
Traceback (most recent call last):
File "~/impftermin_checker.py", line 302, in <module>
if check_impftermin(driver=driver, dataset=data):
File "~/impftermin_checker.py", line 227, in check_impftermin
date_2 = datetime.strptime(dates[2][5:23], "%d.%m.%Y - %H:%M")
File "/usr/local/Cellar/[email protected]/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/_strptime.py", line 568, in _strptime_datetime
tt, fraction, gmtoff_fraction = _strptime(data_string, format)
File "/usr/local/Cellar/[email protected]/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/_strptime.py", line 349, in _strptime
raise ValueError("time data %r does not match format %r" %
ValueError: time data ' erforderlich' does not match format '%d.%m.%Y - %H:%M'
Due to the second date (or it's whole HTML) not being available, the bot crashes when trying to read that as a date.
The quick workaround is to move the alerting functions above the date check/comment the date check, a more thorough solution would probably require looking at the exact HTML though (or maybe just blindly catch that exception)
Hey, thanks for the neat tool!
Sometime the termincheck
https://xxx-iz.impfterminservice.de/rest/suche/termincheck?plz=<PLZ>&leistungsmerkmale=L920,L921,L922,L923
returns a HTTP 429 error (Too many requests). This seems to happen more frequently on Linux than on Windows, but I've noticed it happening particularly frequently with Selenium, while my "manual" browser works fine.
Any idea how those guys at 116117 find out about it being automated? Should one add random wait times?
Thanks for the script. It seems to be stuck on the cookie banner though
Öffne Webseite für "KIZ Messe Stuttgart (Landkreis Esslingen)" (Vermittlungscode: ohne): https://229-iz.impfterminservice.de//impftermine/service?plz=70629 (Zeit: 2021-06-05 10:52:14)
Akzeptiere Cookie-Banner.
Cookie-Banner nicht gefunden, überspringe diesen Schritt
Cookie-Banner ist immer noch da, breche ab.
Warte 11s vor dem nächsten Code.
The banner is displayed in the browser window. I have also tried selecting "Standard" as the cookie setting. Nevertheless, the cookie banner comes up every time, even if I confirm the cookies manually.
While executing "python3 impftermin_checker.py" I now get the following error:
Traceback (most recent call last):
File "/Users/XXXXXX/Documents/impftermin/impftermin-checker/impftermin_checker.py", line 35, in
if config["use_chrome"]:
KeyError: 'use_chrome'
Before pulling the latest master it worked - except the cookie banner.
Thank's for the script, I'm using it to find appointments for relatives.
When I manually used impfterminservice.de ~one month ago, the "Anspruchsprüfung" required users to provide an age, which is supported by your script.
However, the website now asks users to provide a birthday in tt.mm.yyyy format when you get through clicking "Nein".
Just wanted to raise awareness on the difference, please close/delete this issue in case the script supports it already.
does it work with Johnson & johnson, termin search because you only get one date?
Hey,
seems like "Recommended option to get a Vermittlungscode instantly (Windows-only)" is not working anymore, or can anyone explain how to do it?
I inserted the code in fiddler as described:
static function OnBeforeResponse(oSession: Session) {
if (oSession.uriContains("impfterminservice") && oSession.uriContains("termincheck")) {
oSession.utilSetResponseBody('{"termineVorhanden":true,"vorhandeneLeistungsmerkmale":["L921"]}')
}
if (m_Hide304s && oSession.responseCode == 304) {
oSession["ui-hide"] = "true";
}
}
But when visiting the page: https://357-iz.impfterminservice.de/impftermine/check
I get the error message: Schnellprüfung nicht erfolgreich.
Can anyone support please?
Thanks!
It should be selectable via the config.json
file which Selenium Driver (Chrome, Firefox, ...) the tool should use. Based on the configuration, the correct driver should be chosen + configured automatically.
I'm getting the output below:
Öffne Webseite für "Impfzentrum Ludwigsburg" (Vermittlungscode: ohne): https://005-iz.impfterminservice.de//impftermine/service?plz=71636 (Zeit: 2021-06-06 10:45:55)
Akzeptiere Cookie-Banner.
Klicke auf "Nein, Anspruch prüfen".
Überhaupt keine Vermittlungscodes verfügbar, breche ab.
Warte 10s vor dem nächsten Code.
What's the meaning of Überhaupt keine Vermittlungscodes verfügbar, breche ab. and how can I fix it?
My data sets look like this:
{
"name": "Impfzentrum Klinikum Stuttgart in der Liederhalle (Hegel-Saal)",
"plz": "70174",
"Ort": "Stuttgart",
"url": "002-iz.impfterminservice.de/",
"Adresse": "Berliner Platz 1",
"age": 44,
"notification_emails": ["[email protected]"]
},
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.