Giter Club home page Giter Club logo

impf-botpy's People

Contributors

alfonsrv avatar developertk avatar lusor avatar mad73923 avatar marcelbochtler avatar mariusoei avatar mod242 avatar phoenix4815 avatar sbmueller avatar shirkanesi avatar stremlau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

impf-botpy's Issues

Instant code Generation No Response

For some reasons, Im unable to generate a Code using the --code method. I guess the error is some kind of rate limiting.

I get two kinds of errors:
Either I get ratelimited, have to wait some time and then get this response:

An error occurred requesting code from server; response [200]

Or I am not forced to wait some time, but then I instantly get

An error occurred requesting code from server; response [429]

No matter, which error occurs, this is always the last line in the log:

[INFO] <impf.api.api.py:43> {}

So I dont seem to get any response at all.

As a User-Agent, I used the default one and Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36

I tried it with 2 different Phonenumbers and 3 different Emails, so I dont think its because of that.
The locations I tried are 88444 Ummendorf, 88212 Ravensburg and 89073 Ulm

I also tried to wait 30 Minutes after some tries and 3 different IPs, and also from my server, nothing worked.

Also I tried it in Docker and natively on Windows, both time the same error

2021-05-20 18:57:06,128 - [INFO] <impf.browser.browser.py:140>  89073: Navigating to ImpfterminService
2021-05-20 18:57:08,545 - [INFO] <impf.browser.browser.py:153>  89073: Selected Bundesland: Baden-WĂŒrttemberg           
2021-05-20 18:57:08,760 - [INFO] <impf.browser.browser.py:161>  89073: Selected Impfzentrum: 89073 Ulm, Zentrales Impfzentrum Ulm
2021-05-20 18:57:27,263 - [INFO] <impf.api.api.py:33>  API: Attempting to get Vermittlungscode from server              
2021-05-20 18:57:30,719 - [ERROR] <impf.api.api.py:44>  API: An error occurred requesting code from server; status code [429]                                                                                                                   
2021-05-20 18:57:30,720 - [INFO] <impf.api.api.py:45>  API: Response: {}

Edit:
I tried to put the steps done in the API.py into a standalone script, and here I constistently get Statuscode 200, but no returned data

Timeout Exception

Hej,
bot threw this exception, but continued running. Hope it wasn't a working appointment that got skipped. Haha.. But i guess Bot was waiting for page to load. But didn't? Dunno...

An unexpected exception occurred
Traceback (most recent call last):
File "/Users/instabilothek/Documents/python/impf-botpy/impf/browser.py", line 315, in control_main
self.confirm_eligible()
File "/Users/instabilothek/Documents/python/impf-botpy/impf/browser.py", line 185, in confirm_eligible
submit = self.wait.until(EC.element_to_be_clickable((By.XPATH, f'//button[@type="submit"]')))
File "/Users/instabilothek/opt/anaconda3/lib/python3.7/site-packages/selenium/webdriver/support/wait.py", line 80, in until
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:

Problem after starting

Describe the issue
The bot was running for approx. 5 days without any luck so I decided to do an update and rerun it. It's now not working anymore.

Versions
Rasberry Pi, Version 0.46

Log files

pi@raspberrypi:~/Desktop/impf-botpy $ python3 main.py
2021-06-07 21:15:09,168 - [INFO] <__main__.main.py:117>  Starting up Impf Bot.py - github/@alfonsrv, 05/2021 (version 0.46)
[x] General
Traceback (most recent call last):
  File "main.py", line 121, in <module>
    print_config()
  File "main.py", line 22, in print_config
    print(f'- Birthday: {settings.BIRTHDATE}')
AttributeError: module 'settings' has no attribute 'BIRTHDATE'

Exception bei verfuegbarem Termin

Hallo,

beim Versuch, einen freien Impftermin ueber Telegram zu buchen, reagierte der Bot (Version 0.43b) mit einer Exception der Form:

impf-botpy | 2021-05-28 20:53:44,382 - [INFO] impf.alert.alert.py:41 Read APPOINTMENT_SLOT Code from Telegram: 2
impf-botpy | 2021-05-28 20:53:44,382 - [WARNING] impf.browser.browser.py:298 xxxxx: Received Appointment indicator from backend: 2 - booking now...
impf-botpy | 2021-05-28 20:53:44,383 - [INFO] impf.api.api.py:215 API: Booking appointment for xxxxx
impf-botpy | 2021-05-28 20:53:44,531 - [ERROR] impf.browser.browser.py:276 xxxxx: Unexpected exception occurred trying to book appointments remotely!
impf-botpy | Traceback (most recent call last):
impf-botpy | File "/app/impf/browser.py", line 274, in alert_appointment
impf-botpy | self.remote_booking()
impf-botpy | File "/app/impf/browser.py", line 299, in remote_booking
impf-botpy | if api.book_appointment(appointments, int(_code)):
impf-botpy | File "/app/impf/decorators.py", line 119, in func
impf-botpy | x = f(self, *args, **kwargs)
impf-botpy | File "/app/impf/api.py", line 234, in book_appointment
impf-botpy | r = self.xs.post(f'{self.host}/rest/buchung', json=data)
impf-botpy | File "/app/impf/decorators.py", line 107, in api_response
impf-botpy | x = self._handle_error(response.status_code, response.json())
impf-botpy | File "/app/impf/api.py", line 54, in _handle_error
impf-botpy | if 'Anfragelimit erreicht' in message.get('error'):
impf-botpy | TypeError: argument of type 'NoneType' is not iterable
impf-botpy | 2021-05-28 20:53:44,532 - [INFO] impf.alert.alert.py:63 Sending alert "Appointment could not be booked – please continue manually!"
impf-botpy | 2021-05-28 21:03:48,773 - [WARNING] impf.browser.decorators.py:81 xxxxx: Exiting...

Davor gab es bereits eine Exception bei der Alarmierung:

2021-05-28 20:52:27,941 - [ERROR] impf.alert.alert.py:56 An unexpected exception occurred while reading alerts! Please report this issue to https://github.com/alfonsrv/impf-botpy/issues
impf-botpy | Traceback (most recent call last):
impf-botpy | File "/app/impf/alert.py", line 54, in read_backend
impf-botpy | code = _read_backend(telegram_read, match_func) or code
impf-botpy | File "/app/impf/alert.py", line 39, in _read_backend
impf-botpy | code = backend_func(match_func)
impf-botpy | File "/app/impf/alert.py", line 124, in telegram_read
impf-botpy | if match_func(_message.get('text')) and time() - _message.get('date') <= 120:
impf-botpy | File "/app/impf/alert.py", line 32, in appointment_slot
impf-botpy | m = APPT_RE.search(string.strip())
impf-botpy | AttributeError: 'NoneType' object has no attribute 'strip'

Beim Versuch, den Termin dann manuell zu buchen, wurde er zwar noch angezeigt, konnte aber nicht mehr gebucht werden, obwohl die 10 Minuten noch nicht abgelaufen waren.

Als Feedback.

Regards,

The State of Docker containers

Been addressing it here and there, but wanted to centrally document the current state and issues when using Docker environments.

The main issue being that the bot is reliably flagged by ImpfterminService when running in Docker containers. It's basically unusable from my experience, as it's stuck with getting 429s thrown at it. E.g. even after multiple hours it cannot enter the Vermittlungscode successfully – when reloading the page in the container and inputting it manually, it works first try. After that it can monitor for new appointments flawlessly – even though I haven't been able to get a successful alert from it yet.

Maybe some mouse wiggles can fix it. I'm a bit torn apart tho. While I want to solve it on a technical level, I think Docker containers only benefit a very small margin of people and it's likely an abuse-factor anyways.

ERROR bei pip3 install -r requirements.txt --user

Hallo,

ich habe Probleme den Bot zum laufen zu bringen. Bisher habe ich mich an der Anleitung fĂŒr Dummies entlanggehangelt. Bei der Eingabe des commands: 'pip3 install -r requirements.txt --user' kommt es jedoch zu einer Fehlermeldung:

Fehler 1

Habe zu Fehlerbehandlung folgendes probiert:
-löschen der Zeilen cryptography + zulip im file requirements.txt
-Python neu installieren mit den beschriebenen customized Einstellungen
-Update wie in der Fehlermeldung empfohlen mit 'python.exe -m pip install --upgrade pip' :
Fehler2

-installieren von 'pip install chardet'
-hinzufĂŒgen des Pfads 'C:\Users---\AppData\Roaming\Python\Python39\Scripts' zu der Systemvariablen 'Path'

Die jetzige Fehlermeldung bei der Eingabe von 'pip3 install -r requirements.txt --user' ist wie folgt:

Fehler 3


C:\Users---\Desktop\Impfbot\impf-botpy-main>pip3 install -r requirements.txt --user
Collecting certifi==2020.12.5
Using cached certifi-2020.12.5-py2.py3-none-any.whl (147 kB)
Collecting cffi==1.14.5
Using cached cffi-1.14.5-cp39-cp39-win_amd64.whl (179 kB)
ERROR: Could not find a version that satisfies the requirement chardet==4.0.0® (from versions: 1.0, 1.0.1, 1.1, 2.1.1, 2.2.1, 2.3.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 4.0.0)
ERROR: No matching distribution found for chardet==4.0.0®


Mein Rechner lÀuft mit Windows 10, die Version des Bots ist denk ich die neueste (habe ihn vor 2-3 h runtergeladen).

Vielen Dank schonmal.

LG

Geburtsdatum ungueltig oder in der Zukunft

Describe the issue
After the latest maintenance window on the impfterminservice server, when trying to obtain a code using /code, I get an error "Geburtsdatum ungueltig oder in der Zukunft". It looks like the api changed a little bit, since there is no option to actually enter a birth date.

Versions
latest

Log files

2021-06-03 21:12:26,461 - [INFO] impf.api.api.py:168 API: Attempting to get Vermittlungscode from server
2021-06-03 21:12:26,701 - [WARNING] impf.api.api.py:57 API: Endpoint returned Error: Geburtsdatum ungueltig oder in der Zukunft
2021-06-03 21:12:26,701 - [INFO] impf.api.api.py:58 API: Cookies probably expired – raising AdvancedSessionCache
2021-06-03 21:12:26,702 - [WARNING] impf.api.decorators.py:133 API: Underlying service layer indicating invalid session for <generate_vermittlungscode> – refreshing all cookies and retrying
2021-06-03 21:12:28,077 - [INFO] impf.browser.browser.py:169 76137: Navigating to ImpfterminService
2021-06-03 21:12:31,724 - [INFO] impf.browser.browser.py:182 76137: Selected Bundesland: Baden-WĂŒrttemberg
2021-06-03 21:12:31,858 - [INFO] impf.browser.browser.py:190 76137: Selected Impfzentrum: 76137 Karlsruhe, Kreisimpfzentrum Schwarzwaldhalle Karlsruhe
2021-06-03 21:12:49,104 - [INFO] impf.api.api.py:168 API: Attempting to get Vermittlungscode from server
Traceback (most recent call last):
File "C:\Users\Florian\impfung\impf-botpy\impf\decorators.py", line 131, in func
x = f(self, *args, **kwargs)
File "C:\Users\Florian\impfung\impf-botpy\impf\api.py", line 177, in generate_vermittlungscode
r = self.xs.post(f'{self.host}/rest/smspin/anforderung', json=data)
File "C:\Users\Florian\impfung\impf-botpy\impf\decorators.py", line 119, in api_response
x = self._handle_error(response.status_code, response.json())
File "C:\Users\Florian\impfung\impf-botpy\impf\api.py", line 59, in _handle_error
raise AdvancedSessionCache(code, message)
kunft'}

Thanks.

Crash on telegram notification

Hey there,

now that's not nice: something caused the worker to crash when sending the telegram notification - and I added that part.
I guess at the very least there should be a try/except around the actual message request.

Maybe you understand the stack trace better than me, because this doesn't mean anything to me:

File "...impf-botpy\impf\browser.py", line 311, in control_main
    if self.code: return self.control_appointment()
  File "...impf-botpy\impf\browser.py", line 365, in control_appointment
    self.alert_available()
  File "...impf-botpy\impf\browser.py", line 290, in alert_available
    send_alert(settings.ALERT_AVAILABLE.replace('{{ LOCATION }}', self.location_full))
  File "...impf-botpy\impf\alert.py", line 42, in send_alert
    telegram_send(message)
  File "...impf-botpy\impf\alert.py", line 72, in telegram_send
    response = requests.get(send_text)
  File "...\Programs\Python\Python37\lib\site-packages\requests\api.py", line 76, in get
    return request('get', url, params=params, **kwargs)
  File "...\Programs\Python\Python37\lib\site-packages\requests\api.py", line 61, in request    return session.request(method=method, url=url, **kwargs)
  File "...\Programs\Python\Python37\lib\site-packages\requests\sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "...\Programs\Python\Python37\lib\site-packages\requests\sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "...\Programs\Python\Python37\lib\site-packages\requests\adapters.py", line 449, in send
    timeout=timeout
  File "...\Programs\Python\Python37\lib\site-packages\urllib3\connectionpool.py", line 696, in urlopen
    self._prepare_proxy(conn)
  File "...\Programs\Python\Python37\lib\site-packages\urllib3\connectionpool.py", line 964, in _prepare_proxy
    conn.connect()
  File "...\Programs\Python\Python37\lib\site-packages\urllib3\connection.py", line 359, in connect
    conn = self._connect_tls_proxy(hostname, conn)
  File "...\Programs\Python\Python37\lib\site-packages\urllib3\connection.py", line 506, in _connect_tls_proxy
    ssl_context=ssl_context,
  File "...\Programs\Python\Python37\lib\site-packages\urllib3\util\ssl_.py", line 432, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls)
  File "...\Programs\Python\Python37\lib\site-packages\urllib3\util\ssl_.py", line 474, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock)
  File "...\Programs\Python\Python37\lib\ssl.py", line 412, in wrap_socket
    session=session
  File "...\Programs\Python\Python37\lib\ssl.py", line 810, in _create
    raise ValueError("check_hostname requires server_hostname")
ValueError: check_hostname requires server_hostname

Marius

Edit: Apparently it's a bug with some versions of urllib3: https://stackoverflow.com/questions/66642705/why-requests-raise-this-exception-check-hostname-requires-server-hostname

Booking an appointment sometime needs a page reload

I encountered this issue when I tried to book an appointment last week. impf-botpy alerted me to an available appointment and I then filled the form manually. However, the submit button was not enabled and I could not finish booking.

I then reloaded the page and the reserved appointment was still there (with the correct reservation time) and I now could book it successfully.

I suspect the issue is connected to the negative reservation time which is being displayed when using RESCAN_APPOINTMENT. The correct time is being displayed on the appointment popup, but not on the underlying page which will not be updated when the time ran out and new appointments are being searched for.

If this is a general issue and did not only happen to me, I'd suggest to do a page reload after an appointment was found and only then alert and potentially do the booking.

Cheers,
Volker

Stays on waiting room (Warteraum) for main page of one vaccination center although others are available

Describe the issue

  • Application runs normally for some centers
  • When reaching specific centers with an issue, the waiting room is shown forever and the application does not continue to the next centers. It stays on the page (e.g. https://003-iz.impfterminservice.de/impftermine/service?plz=74360) of a specific center.
  • This waiting room is also shown when using a different device on a different internet connection (phone), so I don't think it means the IP was banned

image

Versions
Ubuntu 20.04 x64

$ python3 main.py --version
0.46

Log files

2021-06-09 21:50:34,858 - [DEBUG] <selenium.webdriver.remote.remote_connection.remote_connection.py:440>  Finished Request
2021-06-09 21:50:34,858 - [DEBUG] <selenium.webdriver.remote.remote_connection.remote_connection.py:388>  GET http://127.0.0.1:41925/session/372b9c446566d52275b12e945ae38bb3/element/76fd1fcc-f533-4dd8-80a4-8be1221c9dc7/text {"id": "76fd1fcc-f533-4dd8-80a4-8be1221c9dc7"}
2021-06-09 21:50:34,871 - [DEBUG] <urllib3.connectionpool.connectionpool.py:452>  http://127.0.0.1:41925 "GET /session/372b9c446566d52275b12e945ae38bb3/element/76fd1fcc-f533-4dd8-80a4-8be1221c9dc7/text HTTP/1.1" 200 54
2021-06-09 21:50:34,872 - [DEBUG] <selenium.webdriver.remote.remote_connection.remote_connection.py:440>  Finished Request
[repeats...]
2021-06-09 21:50:39,877 - [DEBUG] <selenium.webdriver.remote.remote_connection.remote_connection.py:388>  POST http://127.0.0.1:41925/session/372b9c446566d52275b12e945ae38bb3/element {"using": "xpath", "value": "//h1"}
2021-06-09 21:50:39,900 - [DEBUG] <urllib3.connectionpool.connectionpool.py:452>  http://127.0.0.1:41925 "POST /session/372b9c446566d52275b12e945ae38bb3/element HTTP/1.1" 200 88
2021-06-09 21:50:39,900 - [DEBUG] <selenium.webdriver.remote.remote_connection.remote_connection.py:440>  Finished Request
2021-06-09 21:50:39,901 - [DEBUG] <selenium.webdriver.remote.remote_connection.remote_connection.py:388>  GET http://127.0.0.1:41925/session/372b9c446566d52275b12e945ae38bb3/element/4dfa27e2-c606-4b4e-b40c-ab66920e6b0f/text {"id": "4dfa27e2-c606-4b4e-b40c-ab66920e6b0f"}
2021-06-09 21:50:39,931 - [DEBUG] <urllib3.connectionpool.connectionpool.py:452>  http://127.0.0.1:41925 "GET /session/372b9c446566d52275b12e945ae38bb3/element/4dfa27e2-c606-4b4e-b40c-ab66920e6b0f/text HTTP/1.1" 200 54
2021-06-09 21:50:39,932 - [DEBUG] <selenium.webdriver.remote.remote_connection.remote_connection.py:440>  Finished Request

Source code of waiting room page

Settings module not found

When starting the python.exe main.py following error occurs:

Traceback (most recent call last):
File "main.py", line 8, in
import settings
ModuleNotFoundError: No module named 'settings'

What's wrong with the configuration? I use Win10 with Chromedriver

Troubleshooting Python was not found

Hello
I have in cd line this error
C:\Users\user>python3 main.pypip3 install -r requirements.txt --user
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.

I follow this instructions
You did not install Python properly. Either reinstall, following the steps or delete the python.exe and python3.exe in %LocalAppData%\Microsoft\WindowsApps

BUT I can't delete python.exe & python3.exe in %LocalAppData%\Microsoft\WindowsApps
I add the windows message in attachement.
fehler

I running win10 as adminstrator
I reinstall Python with the link provide in this page

Any advise ?

Thanks a lot

No module named 'dataclasses'

python3 main.py --code
Traceback (most recent call last):
  File "main.py", line 11, in <module>
    from impf.api import API
  File "/root/impf-botpy/impf/api.py", line 2, in <module>
    from dataclasses import dataclass, field
ModuleNotFoundError: No module named 'dataclasses'

do we need to add dataclasses in requierements ?

For others with the issues: quick workaround: pip3 install dataclasses

Crash when checking for an appointment with a valid code

This crash happened for an impfzentrum with a code.
It might be possible that an appointment was available, as other times it doesn't crash while waiting.

2021-05-18 19:36:44,941 - [INFO] <impf.browser.browser.py:168>  71636: No longer in waiting room!
2021-05-18 19:37:07,783 - [ERROR] <impf.browser.browser.py:334>  71636: An unexpected exception occurred
Traceback (most recent call last):
  File "/home/marcel/workspace/impf-botpy/impf/browser.py", line 312, in control_main
    if self.code: return self.control_appointment()
  File "/home/marcel/workspace/impf-botpy/impf/browser.py", line 356, in control_appointment
    appointments = self.search_appointments()
  File "/home/marcel/workspace/impf-botpy/impf/browser.py", line 260, in search_appointments
    element = self.driver.find_element_by_xpath('//*[contains(text(), "1. Impftermin")]')
  File "/home/marcel/.local/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 394, in find_element_by_xpath
    return self.find_element(by=By.XPATH, value=xpath)
  File "/home/marcel/.local/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 976, in find_element
    return self.execute(Command.FIND_ELEMENT, {
  File "/home/marcel/.local/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/home/marcel/.local/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[contains(text(), "1. Impftermin")]"}
  (Session info: chrome=90.0.4430.212)

2021-05-18 19:37:07,859 - [INFO] <__main__.main.py:45>  Waiting until 19:42:07 before checking the next location

Feedback & Feature Requests

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!

Buy me a Coffee

Probleme mit Auswahl des Impfzentrums im Dropdown

Vorneweg: Tausend Dank, tolles Tool, mit minimalen Anpassungen direkt nach 24h meinen Impftermin bekommen 👍

Zum Problem: an dieser Stelle:

(By.XPATH, f'//li[@role="option" and contains(text() , "{self.location}")]')))

wird versucht mittels self.location im Dropdown das gewĂŒnschte Impfzentrum auszuwĂ€hlen; nach meiner Erfahrung klappt das leider nicht immer; Reutlingen und TĂŒbingen waren kein Problem, aber wenn z.B. self.location = "70629 Messe Stuttgart" war, ging es nicht mehr weiter zum nĂ€chsten Schritt (Leider erfolgt hier auch keine Fehlermeldung).
Erst mit begrenzen der Optionen-Suche auf nur die Postleitzahl :

    element = self.wait.until(EC.presence_of_element_located(
        (By.XPATH, f'//li[@role="option" and contains(text() , "{self.location[:5]}")]')))

kam dann im nÀchsten Schritt die Erfolgsmeldung "Selected Impfzentrum: 70629 Leinfelden-Echterdingen, KIZ Messe Stuttgart (Landkreis Esslingen)".

Alternativ könnte man wahrscheinlich auch - wie es scheinbar ja auf der Webseite funktioniert - aus den statischen EintrĂ€gen in 'https://www.impfterminservice.de/assets/static/impfzentren.json' die Strings fĂŒr PLZ, Ort, und Zentrumsname zusammen-joinen und dann oben fĂŒr die Auswahl benutzen.

Eingabe Geburtsdatum

Ich kam heute morgen nach einigen Stunden mit dem Bot beim Server 001-iz zur Zuteilung einer Vermittlungscodes und da wurde dann ein Geburtsdatum abgefragt anstatt des Alters. Ich kann mich erinnern dass da frĂŒher eine Alterseingabe erschien, aber keine Datumseingabe. In der Config kann man ja nur das Alter eintragen. Jedenfalls kam der Bot bei dieser Eingabe nicht weiter. Habe leider keinen Screenshot o.Ă€.

Crash when appointment is available without code

It looks like the bot crashen when an appointment is available (without code):

2021-05-18 19:09:22,296 - [INFO] <impf.browser.browser.py:168>  71636: No longer in waiting room!
2021-05-18 19:09:53,950 - [ERROR] <impf.browser.browser.py:334>  71636: An unexpected exception occurred
Traceback (most recent call last):
  File "/home/marcel/workspace/impf-botpy/impf/browser.py", line 316, in control_main
    self.confirm_eligible()
  File "/home/marcel/workspace/impf-botpy/impf/browser.py", line 185, in confirm_eligible
    submit = self.wait.until(EC.element_to_be_clickable((By.XPATH, f'//button[@type="submit"]')))
  File "/home/marcel/.local/lib/python3.9/site-packages/selenium/webdriver/support/wait.py", line 80, in until
    raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message: 

2021-05-18 19:09:54,082 - [INFO] <__main__.main.py:45>  Waiting until 19:14:54 before checking the next location

I checked this Impfzentrum at that time and was able to get a code. I doubt that this was an coincidence.

Always loosing cookie bm_mi after some while

Hi,

I'm always loosing the bm_mi after some while of running the script. I first noticed this after an appointment was available, but the appointment did not fit for me so I didn't try booking it. However, I'm afraid that the next time I find an appointment I might have an issue booking it without the cookie so I quickly added the cookie check every time there is no appointment found. After starting the script it always looks fine, but after some while (could be an hour or only 15min) I suddenly start getting warnings about the missing cookie again.

I have a pretty default configuration. Only one location configured and I only changed BOOK_REMOTELY and SLEEP_NIGHT.

Wouldn't it be possible to always check the cookies and in case it is not valid anymore reload the page or something to get a refresh of the cookies?

Version: 0.43b

Thanks.

Termin nicht mehr verfĂŒgbar bei Buchung

Ersteinmal vielen vielen Dank fĂŒrs programmieren :) Die Suche lĂ€uft soweit auch stabil, aber ich hatte jetzt schon 3x das Problem, dass ein Termin gefunden wurde, ich alle Daten ausfĂŒllen konnte aber sobald ich den Termin verbindlich buchen will kommt eine Meldung, dass der ausgewĂ€hlte Termin nicht mehr zur VerfĂŒgung steht. War noch deutlich innerhalb der 10 Minuten Terminreservierung und auch die Seite neu laden hat nicht geholfen (Termin war noch verfĂŒgbar, aber es kam wieder die gleiche Meldung). Eine Idee woran das liegen könnte, oder ist es tatsĂ€chlich einfach die Seite selbst? Danke schon mal fĂŒr die Hilfe.

Gerade habe ich mir noch mal den Ouput angeschaut. Direkt vor der Terminfindung ist er zwei Mal in den AssertionError gelaufen und hat dann einen Termin gefunden. Ob da ein Zusammenhang besteht, oder das nur Zufall ist kann ich nicht beurteilen.

2021-05-31 09:23:38,549 - [ERROR] impf.browser.decorators.py:73 69469: AssertionError occurred in <control_appointment>. This usually happens if your computer/internet connection is slow or if the ImpfterminService site changed.
2021-05-31 09:23:38,550 - [ERROR] impf.browser.decorators.py:75 69469: Sleeping for 120s before continuing, giving the user the ability to interact before attempting to revover automatically...
2021-05-31 09:25:38,562 - [INFO] impf.browser.browser.py:539 69469: Current page title is "<selenium.webdriver.remote.webelement.WebElement (session="29f64e3fbec8f0f3ca2f6f957c4f49eb", element="7a10e4d0-89f2-4635-851a-6bd8a75d6972")>"
2021-05-31 09:25:38,580 - [INFO] impf.browser.browser.py:559 69469: Continuing with reset via <control_main>
2021-05-31 09:25:38,899 - [INFO] impf.browser.browser.py:459 69469: Connected to server [001]
2021-05-31 09:25:39,071 - [ERROR] impf.browser.decorators.py:73 69469: AssertionError occurred in <control_main>. This usually happens if your computer/internet connection is slow or if the ImpfterminService site changed.
2021-05-31 09:25:39,072 - [ERROR] impf.browser.decorators.py:75 69469: Sleeping for 120s before continuing, giving the user the ability to interact before attempting to revover automatically...
2021-05-31 09:27:39,082 - [INFO] impf.browser.browser.py:539 69469: Current page title is "<selenium.webdriver.remote.webelement.WebElement (session="29f64e3fbec8f0f3ca2f6f957c4f49eb", element="a5f0413d-1ebb-47a4-ab7e-d886a4b82e49")>"
2021-05-31 09:27:39,094 - [INFO] impf.browser.browser.py:551 69469: Continuing with <control_appointment>
2021-05-31 09:27:49,306 - [INFO] impf.browser.browser.py:516 69469: RESCAN_APPOINTMENT is enabled - automatically rechecking in 2min...
2021-05-31 09:29:49,322 - [INFO] impf.browser.browser.py:520 69469: Rechecking for new appointments
2021-05-31 09:31:59,511 - [INFO] impf.browser.browser.py:520 69469: Rechecking for new appointments
2021-05-31 09:32:07,640 - [WARNING] impf.browser.browser.py:281 69469: Available appointments! Waiting for user input
2021-05-31 09:32:07,643 - [INFO] impf.alert.alert.py:62 Sending alert "Impftermine verfĂŒgbar in Impfzentrum! Reserviert fĂŒr die nĂ€chsten 10 Minuten... Buchungslink: ......

Timeout in confirm_eligible

hej,
i am getting this:

An unexpected exception occurred in <control_main>
Traceback (most recent call last):
File "/Users/instabilothek/Documents/python/impf-botpy-1/impf/decorators.py", line 63, in func
return f(self, *args, **kwargs)
File "/Users/instabilothek/Documents/python/impf-botpy-1/impf/browser.py", line 388, in control_main
self.confirm_eligible()
File "/Users/instabilothek/Documents/python/impf-botpy-1/impf/browser.py", line 206, in confirm_eligible
'//input[@type="radio" and @formcontrolname="isValid"]//following-sibling::span[contains(text(),"Ja")]/..')))
File "/Users/instabilothek/opt/anaconda3/lib/python3.7/site-packages/selenium/webdriver/support/wait.py", line 80, in until
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:

he seems to not be able to find some button..

Getting 429 all the time

Hi,
first of all thanks for the program.
I completed the setup and then ran the program and it's running for a while now. I realised that I'm getting 429- shadow bans all the time. Is there anything that I can do?
Don't know if it's the right log file but here it is:
bot.log

Docker: google-chrome not found

At building the docker container, the google-chrome-stable package can't be found.
I added Gotify in my fork as messanger, didn't change anything in the Dockerfile.
399b8a518229465b961bb4e2bf16405058be3a53

matthias@rockpi:~/impf-botpy$ docker build ./docker/
Sending build context to Docker daemon  6.656kB
Step 1/18 : FROM debian:buster
 ---> b829e973f6c9
Step 2/18 : ENV PYTHONUNBUFFERED 1
 ---> Using cache
 ---> 76e78dc86eb1
Step 3/18 : RUN apt-get update -y
 ---> Using cache
 ---> f822ea9d1ca2
Step 4/18 : RUN DEBIAN_FRONTEND=noninteractive     apt-get install -y unzip wget curl     xorg vnc4server autocutsel lxde-core novnc python-websockify     libffi-dev musl-dev libssl-dev python3-dev gcc     python3 python3-pip     && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
 ---> Using cache
 ---> 1eb0f36967e7
Step 5/18 : RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - &&     echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list &&     apt-get update -y &&     apt-get install -y google-chrome-stable &&     CHROMEVER=$(google-chrome --product-version | grep -o "[^\.]*\.[^\.]*\.[^\.]*") &&     DRIVERVER=$(curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROMEVER") &&     wget -q --continue -P /chromedriver "http://chromedriver.storage.googleapis.com/$DRIVERVER/chromedriver_linux64.zip" &&     unzip /chromedriver/chromedriver* -d /usr/local/bin &&     rm -r -f /chromedirver/
 ---> Running in f6f9e78b86e8
Warning: apt-key output should not be parsed (stdout is not a terminal)
OK
Get:1 http://deb.debian.org/debian buster InRelease [121 kB]
Get:2 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:3 http://dl.google.com/linux/chrome/deb stable InRelease [1811 B]
Get:4 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
Get:5 http://deb.debian.org/debian buster/main armel Packages [7628 kB]
Get:6 http://deb.debian.org/debian buster-updates/main armel Packages [10.9 kB]
Get:7 http://security.debian.org/debian-security buster/updates/main armel Packages [266 kB]
Fetched 8145 kB in 4s (2214 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package google-chrome-stable
The command '/bin/sh -c wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - &&     echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list &&     apt-get update -y &&     apt-get install -y google-chrome-stable &&     CHROMEVER=$(google-chrome --product-version | grep -o "[^\.]*\.[^\.]*\.[^\.]*") &&     DRIVERVER=$(curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROMEVER") &&     wget -q --continue -P /chromedriver "http://chromedriver.storage.googleapis.com/$DRIVERVER/chromedriver_linux64.zip" &&     unzip /chromedriver/chromedriver* -d /usr/local/bin &&     rm -r -f /chromedirver/' returned a non-zero code: 100

Script throws exception when appointments available

Describe the issue
When a Vermittlungscode is present and the script searches for appointments, as soon as appointments get available, the script throws an error (see below). It seems the send_alert() method is used wrongly.

Versions
macOS 11.3, impf-botpy 0.41

Log files

2021-05-24 11:14:51,964 - [WARNING] <impf.browser.browser.py:253>  <PLZ>: Available appointments! Waiting for user input
2021-05-24 11:14:51,976 - [ERROR] <impf.browser.decorators.py:81>  <PLZ>: An unexpected exception occurred in <control_appointment>
Traceback (most recent call last):
  File "/Users/senpo/src/impf-botpy/impf/decorators.py", line 63, in func
    return f(self, *args, **kwargs)
  File "/Users/senpo/src/impf-botpy/impf/browser.py", line 449, in control_appointment
    self.alert_appointment()
  File "/Users/senpo/src/impf-botpy/impf/browser.py", line 257, in alert_appointment
    send_alert()
TypeError: send_alert() missing 1 required positional argument: 'message'
2021-05-24 11:15:01,987 - [INFO] <__main__.main.py:95>  Waiting until 11:20:01 before checking the next location

Thanks.

Comprehensive Guide to Getting Appointments for Dummies

Getting an Appointment 101

The experience collected is only for BaWĂŒ, but should apply anywhere else too.

GitHub stars

Overview

Getting appointments is just a matter of the amount of Centers you're checking. As of writing this on June 8th, I've been getting 1-3 appointment offers a day, though I have gone without getting any appointments for 2-3 days too – it's just part of the process.

If you're only checking one center over and over again, your chances of getting an appointment are significantly lower. Center capacities vary from their size and overall load – e.g. getting an appointment at Robert Bosch Krankenhaus is like catching an extremely rare PokĂ©mon; I've only seen it give out appointments twice over the period of 4 weeks.

When new appointments are added by a center, you're playing Roulette against everyone else currently checking the center for appointments,– so it's just a matter of improving your chances.

Improving Your Chances

aka Q: I have been searching for 2-85430 days 24/7, but didn't find anything yet! oh my god pls does this even work

If you're only searching one center your chances of getting an appointment are obviously lower. It will definitely take some time due to the reasons mentioned initially.

Improving your chances means turning on parallel searching. Setting CONCURRENT_ENABLED = True enables you to search multiple centers at the same time, thus increasing your chances immensely. Ideally, search with six instances / for six centers concurrently. But why six?

As mentioned in the README.md centers are assigned to specific servers, indicated by the number at the start of the URL. It's best to spread out and choose ONE center on each server to search on. Checking more on the same server doesn't yield any benefit afaik

Just choose 4-6 centers on different servers, get Vermittlungscodes (see below), enter them in your settings.py and start searching. Depending on how many centers you have entered you should set your CONCURRENT_WORKERS to the same values as the centers you added – you might have to decrease it depending on how potent your PC is. And then just be patient; appointments will come.

If your PC cannot handle multiple browsers at the same time at least do not jump around centers while searching. It's usually desirable to keep on checking the same center over and over again.

This is the way I run my setup – it's just an old laptop that I turn on in the morning, and let run throughout the day – imo the smallest Vaccination Center in Stuttgart.

Getting Vermittlungscodes

Getting Vermittlungscodes via the Browser should be avoided at all costs.

aka Q: I'm not getting any Vermittlungscodes! The instant Code Generation is broken! I tried so many times, never works

As long as the Instant Vermittlungscode bullet point is not crossed out on the main page (README.md), it still works. Simply try again in an hour, two, ten, or tomorrow. Just. Keep. On. Trying.

It's unclear whether or not your cookies need a certain age before the server will accept your request; just something to keep in mind. That's why the --surf switch was added, but should also be a-ok to just let the bot run for 2-4 hours before.

And while you're at it, as soon as you can generate one, generate a bunch! One for each of the six centers. One doesn't work? Doesn't matter. Just move on to the next one and try again later.

Disclaimer

Please note: All of this is based on my own experiences – your mileage may vary. A lot of things are unknown about the platform and simply assumptions based on trial-and-error and my previous technical experience. If anything is wrong, please feel free to discuss it, but understand that I cannot get back to each and every one individually. Especially non-elaborated questions, clearly showing a lack of having read this thoroughly or lack of self-initiative, will be ignored.

  • Do not use Docker primarily – searching for appointments works, but you have to help Docker instances to get to the appointment searching page manually
  • Do not use a Raspberry Pi – same as above
  • No new appointments are added on Sunday
  • Do not stress the Impfterminservice API. Lowering your waiting limits and then coming here to cry about your fate of not finding any appointments, giving other people questionable advice is not the spirit. Behave like a reasonable person.
  • Searching between 2400-0900 is usually not the game-changer. It's also unknown if searching excessively could flag your Vermittlungscode as being a bot – so better safe than sorry.
  • If you're not getting any appointments (highly doubt it if you followed this), then – hey, how about changing one of the centers? How about trying with a different Vermittlungscode? Or changing the user agent? Increasing the waiting times? etc etc
  • Simply try things. Ask for advice, but not after 5 seconds. Read this article again. This is the pinnacle of everything you need to know for getting an appointment.

An unexpected exception occurred in <control_appointment>

Describe the issue

Terminal throws the following exception from time to time.
After some minutes the script starts again.

2021-05-23 14:22:03,642 - [ERROR] impf.browser.decorators.py:79 68163: An unexpected exception occurred in <control_appointment>!
Traceback (most recent call last):
File "/Users/marco/Apps/impf-botpy-main/impf/decorators.py", line 61, in func
return f(self, *args, **kwargs)
File "/Users/marco/Apps/impf-botpy-main/impf/browser.py", line 440, in control_appointment
self.rescan_appointments()
File "/Users/marco/Apps/impf-botpy-main/impf/browser.py", line 364, in rescan_appointments
rescan = self.wait.until(EC.presence_of_element_located((By.XPATH, f'//a[contains(text(), "hier")]')))
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/selenium/webdriver/support/wait.py", line 71, in until
value = method(self._driver)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/selenium/webdriver/support/expected_conditions.py", line 64, in call
return _find_element(driver, self.locator)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/selenium/webdriver/support/expected_conditions.py", line 415, in _find_element
raise e
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/selenium/webdriver/support/expected_conditions.py", line 411, in _find_element
return driver.find_element(*by)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 976, in find_element
return self.execute(Command.FIND_ELEMENT, {
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: disconnected: not connected to DevTools
(Session info: chrome=90.0.4430.212)

2021-05-23 14:22:13,644 - [INFO] <main.main.py:95> Waiting until 14:27:13 before checking the next location

Versions

MacOS BigSur 11.3.1
impf-botpy-main 0.4
Python 3.9.5
Chrome 90.0.4430.212 (Offizieller Build) (x86_64)
ChromeDriver 90.0.4430.24

ChromeDriver Binary is stored in the impf-botby-main folder and the path configured in settings.py.

Funktioniert Bot auch fĂŒr "Weitere Impfzentren in NRW"?

Hallo,

Sorry, falls diese Frage schon irgendwo beantwortet wurde: Funktioniert der Bot auch fĂŒr Nordrhein-Westfalen bzw. die "Weiteren Impzentren in NRW"? Wenn man diese Möglichkeit auf impfterminservice.de auswĂ€hlt, wird man ja weitergeleitet auf den Impfterminservice der KassenĂ€rztlichen Vereinigung Nordrhein.

FĂŒr eine kurze Info wĂ€re ich sehr dankbar.

Detatching during waiting room

Hi @alfonsrv,

thanks for all your work and effort, which you're spending on this project!

In the last couple of days I got the following error on a irregular basis:
StaleElementReferenceException - we probably detatched somehow; reinitializing
I already was in the waiting room, when Chrome shuts down and reopens again. After that I find myself again in the waiting room and the normal procedure continues. As far as I'm concerned the problem only occurs for Impfzentren, where I already got a Vermittlungscode.

Versions
Operating System: macOS Big Sur 11.3
current bot version: 0.44b

Log files
2021-06-02 10:37:47,998 - [INFO] impf.browser.browser.py:169 72072: Navigating to ImpfterminService
2021-06-02 10:37:49,396 - [INFO] impf.browser.browser.py:182 72072: Selected Bundesland: Baden-WĂŒrttemberg
2021-06-02 10:37:49,452 - [INFO] impf.browser.browser.py:190 72072: Selected Impfzentrum: 72072 TĂŒbingen, Paul Horn Arena
2021-06-02 10:37:50,129 - [INFO] impf.browser.browser.py:459 72072: Connected to server [003]
2021-06-02 10:37:50,154 - [INFO] impf.browser.browser.py:198 72072: Taking a seat in the waiting room (very german)
2021-06-02 10:40:21,459 - [WARNING] impf.browser.decorators.py:65 72072: StaleElementReferenceException - we probably detatched somehow; reinitializing
2021-06-02 10:40:24,789 - [INFO] impf.browser.browser.py:169 72072: Navigating to ImpfterminService
2021-06-02 10:40:26,344 - [INFO] impf.browser.browser.py:182 72072: Selected Bundesland: Baden-WĂŒrttemberg
2021-06-02 10:40:26,405 - [INFO] impf.browser.browser.py:190 72072: Selected Impfzentrum: 72072 TĂŒbingen, Paul Horn Arena
2021-06-02 10:40:27,086 - [INFO] impf.browser.browser.py:459 72072: Connected to server [003]
2021-06-02 10:40:27,111 - [INFO] impf.browser.browser.py:198 72072: Taking a seat in the waiting room (very german)
2021-06-02 10:41:58,109 - [INFO] impf.browser.browser.py:200 72072: No longer in waiting room!
2021-06-02 10:43:09,402 - [INFO] impf.browser.browser.py:376 72072: Vermittlungscode ok, but not free vaccination slots
2021-06-02 10:43:10,907 - [INFO] impf.browser.browser.py:529 72072: No appointments available right now :(

format birthday is changed ??

Is it possible that the birthday format has changed ?
I think it was before : DD/MM/YYYY
Now : MM/DD/YYYY

When the robots is in this pages, I've never get a SMS-code.
Perhaps this is the raison
Thanks
0000000

Code 400: Geburtsdatum ungueltig oder in der Zukunft

Vorerst vielen Dank fĂŒr dieses großartige Repo. Es hat mir bereits vor einigen Wochen zu einem Termin verholfen. Nun ist auch das letzte Mitglied der Familie an der Reihe...

Bei der aktuellen Version auf einer frischen Installation auf Windows mit Chrome 91 und Chromedriver 91 mit vollstĂ€ndiger Konfiguration schlĂ€gt bei mir auf mehreren Systemen python3 main.py --code mit folgender Meldung fehl. Das Geburtsdatum ist in der Config wie folgt angegeben: 19‎.0‎7‎.‎1996

Hat das sonst noch wer? Was könnte die Ursache sein?

C:\Users\Leon Thierschmidt>python3 Git\impf-botpy\main.py --code
2021-06-07 01:25:20,914 - [INFO] <__main__.main.py:117>  Starting up Impf Bot.py - github/@alfonsrv, 05/2021 (version 0.46)
Before a Vermittlungscode can be generated, you must specify your phone number, email and the location in `settings.py`

The bot is hard-coded to only request BioNTech + Moderna (18-60yo)
Should you request a vaccination for an older demographic or prefer another vaccine this method won't work for you.

Please note: This feature may break at any time – use it while you can!
If it breaks, please just fall back to using the browser instead.


Enter the zip code of the location you require a Vermittlungscode for: 73430
Requesting Vermittlungscode for: KIZ Ostalbkreis, 73430 Aalen
2021-06-07 01:25:27,409 - [INFO] <impf.browser.browser.py:169>  73430: Navigating to ImpfterminService
2021-06-07 01:25:30,422 - [INFO] <impf.browser.browser.py:182>  73430: Selected Bundesland: Baden-WĂŒrttemberg
2021-06-07 01:25:30,680 - [INFO] <impf.browser.browser.py:190>  73430: Selected Impfzentrum: 73430 Aalen, KIZ Ostalbkreis
2021-06-07 01:25:44,858 - [INFO] <impf.api.api.py:181>  API: Attempting to get Vermittlungscode from server
2021-06-07 01:25:45,058 - [WARNING] <impf.api.api.py:59>  API: Endpoint returned Error: Geburtsdatum ungueltig oder in der Zukunft
2021-06-07 01:25:45,058 - [INFO] <impf.api.api.py:60>  API: Cookies probably expired – raising AdvancedSessionCache
2021-06-07 01:25:45,058 - [WARNING] <impf.api.decorators.py:133>  API: Underlying service layer indicating invalid session for <generate_vermittlungscode> – refreshing all cookies and retrying
2021-06-07 01:25:46,670 - [INFO] <impf.browser.browser.py:169>  73430: Navigating to ImpfterminService
2021-06-07 01:25:49,711 - [INFO] <impf.browser.browser.py:182>  73430: Selected Bundesland: Baden-WĂŒrttemberg
2021-06-07 01:25:49,939 - [INFO] <impf.browser.browser.py:190>  73430: Selected Impfzentrum: 73430 Aalen, KIZ Ostalbkreis
2021-06-07 01:26:06,152 - [INFO] <impf.api.api.py:181>  API: Attempting to get Vermittlungscode from server
Traceback (most recent call last):
  File "C:\Users\Leon Thierschmidt\Git\impf-botpy\impf\decorators.py", line 131, in func
    x = f(self, *args, **kwargs)
  File "C:\Users\Leon Thierschmidt\Git\impf-botpy\impf\api.py", line 195, in generate_vermittlungscode
    r = self.xs.post(f'{self.host}/rest/smspin/anforderung', json=data)
  File "C:\Users\Leon Thierschmidt\Git\impf-botpy\impf\decorators.py", line 119, in api_response
    x = self._handle_error(response.status_code, response.json())
  File "C:\Users\Leon Thierschmidt\Git\impf-botpy\impf\api.py", line 61, in _handle_error
    raise AdvancedSessionCache(code, message)
impf.exceptions.AdvancedSessionCache: Cookies likely expired – [400] {'error': 'Geburtsdatum ungueltig oder in der Zukunft'}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Leon Thierschmidt\Git\impf-botpy\main.py", line 118, in <module>
    if args.code: instant_code(); exit()
  File "C:\Users\Leon Thierschmidt\Git\impf-botpy\main.py", line 70, in instant_code
    token = api.generate_vermittlungscode()
  File "C:\Users\Leon Thierschmidt\Git\impf-botpy\impf\decorators.py", line 137, in func
    return next_gen(f)(self, *args, **kwargs)
  File "C:\Users\Leon Thierschmidt\Git\impf-botpy\impf\decorators.py", line 131, in func
    x = f(self, *args, **kwargs)
  File "C:\Users\Leon Thierschmidt\Git\impf-botpy\impf\api.py", line 195, in generate_vermittlungscode
    r = self.xs.post(f'{self.host}/rest/smspin/anforderung', json=data)
  File "C:\Users\Leon Thierschmidt\Git\impf-botpy\impf\decorators.py", line 110, in api_response
    response = f(self, *args, **kwargs)
  File "C:\Users\Leon Thierschmidt\Git\impf-botpy\impf\api.py", line 40, in post
    return self.session.post(*args, **kwargs)
  File "C:\Users\Leon Thierschmidt\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\requests\sessions.py", line 590, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "C:\Users\Leon Thierschmidt\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\requests\sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\Leon Thierschmidt\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\requests\sessions.py", line 671, in send
    extract_cookies_to_jar(self.cookies, request, r.raw)
  File "C:\Users\Leon Thierschmidt\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\requests\cookies.py", line 132, in extract_cookies_to_jar
    jar.extract_cookies(res, req)
AttributeError: 'dict' object has no attribute 'extract_cookies'

ModuleNotFoundError: No module named 'selenium'

Just installed the bot with help of the newbie guide but I get the Error:
"ModuleNotFoundError: No module named 'selenium'" when trying to start.
Any idea how to fix this?

Thanks for your work!

Refresh cookies @429

Hi,
refreshing cookies from scratch should solve the shadowban problem btw :) have you tried that?

restarting main.py -> calls are not repeated

I get some trouble, but after a great support from AllCano (# 56) it was working.
I have to stop and wanted to restart this python script.
I open cd and drag and drop main.py file.

Than it launch the scrypt BUT there is no new call to the 116117 serveur.
Any help would be really appreciate...

C:\Users\user>C:\Users\user\Downloads\impf-botpy-main\main.py
2021-06-08 21:03:59,578 - [INFO] <main.main.py:117> Starting up Impf Bot.py - github/@alfonsrv, 05/2021 (version 0.46)
[x] General

  • Birthday: xxxxxxxxxxxxxxxxxx
  • Mail: xxxxxxxxxxxxxxxxxxx
  • Mobile: xxxxxxxxxxxxxxxxxx
  • Centers: 2 locations
    [x] Remote Booking DISABLED
    [x] Alerting Methods
  • Custom Command ✓
    2021-06-08 21:04:01,473 - [INFO] <main.main.py:88> Keeping Browser open; KEEP_BROWSER is set to True
    2021-06-08 21:04:01,473 - [INFO] impf.browser.browser.py:169 69123: Navigating to ImpfterminService
    2021-06-08 21:04:05,128 - [INFO] impf.browser.browser.py:182 69123: Selected Bundesland: Baden-WĂŒrttemberg
    2021-06-08 21:04:05,381 - [INFO] impf.browser.browser.py:190 69123: Selected Impfzentrum: 69123 Heidelberg, Gesellschaftshaus Pfaffengrund
    2021-06-08 21:04:06,316 - [INFO] impf.browser.browser.py:459 69123: Connected to server [002]
    2021-06-08 21:04:06,356 - [INFO] impf.browser.browser.py:198 69123: Taking a seat in the waiting room (very german)

sh: 1: espeak: not found

Describe the issue
Hi, I run "python3 main.py --alerts" and get (I hided my personal infomation):

[x] General

  • Age: xxxxxxxxxxxxxxxxxxxxxxxx
  • Mail: xxxxxxxxxxxxxxxxxxxxxxxx
  • Mobile: xxxxxxxxxxxxxxxxxxxx
  • Centers: 2 locations
    [x] Remote Booking DISABLED
    [x] Alerting Methods
  • Custom Command ✓
    2021-05-26 18:29:14,362 - [INFO] impf.alert.alert.py:63 Sending alert "Notification test from Impf Bot.py - https://github.com/alfonsrv/impf-botpy"
    sh: 1: espeak: not found

Versions
Ubuntu 20.04, Anaconda 4.8.3, Python 3.8.2

Looks like the notification is not working, I have also tried installing the espeak my own, but I could not find a proper version of it. how can I solve this issue?

Thanks.

Workflow geÀndert - Geburtstdatum statt Alter

Hallo,
erst mal allerbesten Dank fĂŒrs Programmieren.
Habe damit kurzfristig einen Termin fĂŒr einen nahen Verwandten ergattern können.

Nach Wartungsarbeiten gestern Abend hat sich die Webseite bei Impfterminservice etwas geÀndert.

Um einen Vermittlungscode in der die SchnellprĂŒfung zu erhalten wird dort nun nicht mehr nach dem Alter sondern nach dem Geburtsdatum gefragt.

NatĂŒrlich klappt damit die automat. Erkennung nicht mehr richtig und der Workflow stockt.
Gefragt wird nun: "Bitte geben Sie Ihr Geburtsdatum ein" Darunter ein Eingabefeld im Format tt.mm.jjjj

Remote booking funktioniert nicht

Das automatische Buchen (mittels telegram backend) hat heute bei mir nicht funktioniert (manuell zum GlĂŒck dann aber doch noch). Fehlermeldung:

2021-06-07 15:36:37,918 - [ERROR] <impf.browser.browser.py:298>  xPLZx: Unexpected exception occurred trying to book appointments remotely!
Traceback (most recent call last):
  File "/Users/xxxxx/dev/impfbot/impf-botpy/impf/browser.py", line 296, in alert_appointment
    self.remote_booking()
  File "/Users/xxxxx/dev/impfbot/impf-botpy/impf/browser.py", line 322, in remote_booking
    if api.book_appointment(appointments, int(_code)) or self.book_appointment(int(_code)):
  File "/Users/xxxxx/dev/impfbot/impf-botpy/impf/decorators.py", line 131, in func
    x = f(self, *args, **kwargs)
  File "/Users/xxxxx/dev/impfbot/impf-botpy/impf/api.py", line 253, in book_appointment
    r = self.xs.post(f'{self.host}/rest/buchung', json=data)
  File "/Users/xxxxx/dev/impfbot/impf-botpy/impf/decorators.py", line 121, in api_response
    return x or api_call(f)(self, *args, **kwargs)
  File "/Users/xxxxx/dev/impfbot/impf-botpy/impf/decorators.py", line 121, in api_response
    return x or api_call(f)(self, *args, **kwargs)
  File "/Users/xxxxx/dev/impfbot/impf-botpy/impf/decorators.py", line 119, in api_response
    x = self._handle_error(response.status_code, response.json())
  File "/Users/xxxxx/dev/impfbot/impf-botpy/impf/api.py", line 45, in _handle_error
    raise AdvancedSessionError(-1, 'Maximum retries exceeded')
impf.exceptions.AdvancedSessionError: [-1] Maximum retries exceeded
2021-06-07 15:36:37,922 - [INFO] <impf.alert.alert.py:62>  Sending alert "Appointment could not be booked – please continue manually!"

Kann es sein, dass sich beim Backend auf impfterminservice.de etwas verÀndert hat? Zumindest sagt mein Browser (nach anmelden mit Code, sonst 401):
https://229-iz.impfterminservice.de/rest/buchung 404 not found

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.