timreibe / vaccipy

Automatisierte Impfterminbuchung für www.impfterminservice.de
MIT License
517 stars 115 forks source link

Unexpected behaviour when using authorization code from an active appointment #230

Closed marvinruder closed 3 years ago

marvinruder commented 3 years ago

When a vaccination appointment is booked using an authorization code and the script is started again using the same authorization code, it appears if another appointment is being booked using the first postal code of a vaccination center in the list and the time and date of the existing booking. The output is as follows:

2021-05-30 18:51:18.214   impfterminservice   [suc] [*NGN5 | 69123, 70174, 74081, 76287, 77656, 77815, 78224, 79108]   Terminpaar gefunden!
2021-05-30 18:51:18.215   impfterminservice   [suc] [*NGN5 | 69123, 70174, 74081, 76287, 77656, 77815, 78224, 79108]   'Messe Offenburg-Ortenau, Halle 1' in 77656 Offenburg
2021-05-30 18:51:18.215   impfterminservice   [suc] [*NGN5 | 69123, 70174, 74081, 76287, 77656, 77815, 78224, 79108]   1. Termin: 02.06.2021 um 08:28 Uhr
2021-05-30 18:51:18.215   impfterminservice   [suc] [*NGN5 | 69123, 70174, 74081, 76287, 77656, 77815, 78224, 79108]   2. Termin: 14.07.2021 um 19:19 Uhr

2021-05-30 18:51:18.519   impfterminservice   [suc] [*NGN5 | 69123, 70174, 74081, 76287, 77656, 77815, 78224, 79108]   Termin erfolgreich gebucht!

❯ python3 main.py search -f data/group2.json -s 1
                                _                 
                               (_)                
 __   __   __ _    ___    ___   _   _ __    _   _ 
 \ \ / /  / _` |  / __|  / __| | | | '_ \  | | | |
  \ V /  | (_| | | (__  | (__  | | | |_) | | |_| |
   \_/    \__,_|  \___|  \___| |_| | .__/   \__, |
                                   | |       __/ |
                                   |_|      |___/ 

Automatische Terminbuchung für den Corona Impfterminservice

Vor der Ausführung des Programms ist die Berechtigung zur Impfung zu prüfen.
Ob Anspruch auf eine Impfung besteht, kann hier nachgelesen werden:
https://www.impfterminservice.de/terminservice/faq

Bitte trage zunächst deinen Impfcode und deine Kontaktdaten ein.
Die Daten werden anschließend lokal in der Datei 'group2.json' abgelegt.
Du musst sie zukünftig nicht mehr eintragen.

> Sollen die vorhandenen Daten aus 'group2.json' geladen werden (y/n)?: y

Kontaktdaten wurden geladen für: […]

2021-05-30 18:51:40.618   impfterminservice   [inf] [*NGN5 | 69123, 70174, 74081, 76287, 77656, 77815, 78224, 79108]   102 Impfzentren verfügbar
2021-05-30 18:51:40.619   impfterminservice   [inf] [*NGN5 | 69123, 70174, 74081, 76287, 77656, 77815, 78224, 79108]   'Gesellschaftshaus Pfaffengrund' in 69123 Heidelberg ausgewählt
2021-05-30 18:51:40.619   impfterminservice   [inf] [*NGN5 | 69123, 70174, 74081, 76287, 77656, 77815, 78224, 79108]   'Impfzentrum Klinikum Stuttgart in der Liederhalle (Hegel-Saal)' in 70174 Stuttgart ausgewählt
2021-05-30 18:51:40.619   impfterminservice   [inf] [*NGN5 | 69123, 70174, 74081, 76287, 77656, 77815, 78224, 79108]   'Kreisimpfzentrum Heilbronn' in 74081 Heilbronn ausgewählt
2021-05-30 18:51:40.619   impfterminservice   [inf] [*NGN5 | 69123, 70174, 74081, 76287, 77656, 77815, 78224, 79108]   'Impfzentrum Messe Karlsruhe' in 76287 Rheinstetten ausgewählt
2021-05-30 18:51:40.619   impfterminservice   [inf] [*NGN5 | 69123, 70174, 74081, 76287, 77656, 77815, 78224, 79108]   'Messe Offenburg-Ortenau, Halle 1' in 77656 Offenburg ausgewählt
2021-05-30 18:51:40.619   impfterminservice   [inf] [*NGN5 | 69123, 70174, 74081, 76287, 77656, 77815, 78224, 79108]   'Kreisimpfzentrum Landkreis Rastatt in Bühl' in 77815 Bühl ausgewählt
2021-05-30 18:51:40.619   impfterminservice   [inf] [*NGN5 | 69123, 70174, 74081, 76287, 77656, 77815, 78224, 79108]   'Kreisimpfzentrum Singen (Kreis Konstanz)' in 78224 Singen (Hohentwiel) ausgewählt
2021-05-30 18:51:40.619   impfterminservice   [inf] [*NGN5 | 69123, 70174, 74081, 76287, 77656, 77815, 78224, 79108]   'Zentrales Impfzentrum (ZIZ) Freiburg, Messe Freiburg, Messehalle 2' in 79108 Freiburg im Breisgau ausgewählt
2021-05-30 18:51:40.678   impfterminservice   [inf] [*NGN5 | 69123, 70174, 74081, 76287, 77656, 77815, 78224, 79108]   [L920] Altersgruppe: 16+ (Intervall: 40 Tage) --> ['BioNTech']
2021-05-30 18:51:40.678   impfterminservice   [inf] [*NGN5 | 69123, 70174, 74081, 76287, 77656, 77815, 78224, 79108]   [L921] Altersgruppe: 18+ (Intervall: 40 Tage) --> ['Moderna', 'BioNTech']
2021-05-30 18:51:40.678   impfterminservice   [inf] [*NGN5 | 69123, 70174, 74081, 76287, 77656, 77815, 78224, 79108]   [L922] Altersgruppe: 60+ (Intervall: 40 Tage) --> ['Moderna', 'BioNTech', 'AstraZeneca']
2021-05-30 18:51:40.678   impfterminservice   [inf] [*NGN5 | 69123, 70174, 74081, 76287, 77656, 77815, 78224, 79108]   [L923] Altersgruppe: 60+ (Intervall:  ? Tage) --> ['Johnson&Johnson']

2021-05-30 18:51:40.678   impfterminservice   [inf] [*NGN5 | 69123, 70174, 74081, 76287, 77656, 77815, 78224, 79108]   Browser-Cookies generieren
2021-05-30 18:51:55.587   impfterminservice   [inf] [*NGN5 | 69123, 70174, 74081, 76287, 77656, 77815, 78224, 79108]   Browser-Cookie generiert: *TZ9Q==
2021-05-30 18:51:55.898   impfterminservice   [suc] [*NGN5 | 69123, 70174, 74081, 76287, 77656, 77815, 78224, 79108]   Terminpaar gefunden!
2021-05-30 18:51:55.899   impfterminservice   [suc] [*NGN5 | 69123, 70174, 74081, 76287, 77656, 77815, 78224, 79108]   'Gesellschaftshaus Pfaffengrund' in 69123 Heidelberg
2021-05-30 18:51:55.899   impfterminservice   [suc] [*NGN5 | 69123, 70174, 74081, 76287, 77656, 77815, 78224, 79108]   1. Termin: 02.06.2021 um 08:28 Uhr
2021-05-30 18:51:55.899   impfterminservice   [suc] [*NGN5 | 69123, 70174, 74081, 76287, 77656, 77815, 78224, 79108]   2. Termin: 14.07.2021 um 19:19 Uhr

2021-05-30 18:51:55.997   impfterminservice   [err] [*NGN5 | 69123, 70174, 74081, 76287, 77656, 77815, 78224, 79108]   Anfrage wurde von der Botprotection geblockt. Cookies werden erneuert und die Buchung wiederholt.
2021-05-30 18:51:55.997   impfterminservice   [inf] [*NGN5 | 69123, 70174, 74081, 76287, 77656, 77815, 78224, 79108]   Browser-Cookies generieren
2021-05-30 18:52:20.181   impfterminservice   [suc] [*NGN5 | 69123, 70174, 74081, 76287, 77656, 77815, 78224, 79108]   Termin erfolgreich gebucht!
timreibe commented 3 years ago

I think you're the first one noticing this, thanks a lot. We have to check how we could implement this in our workflow. Impfterminservice checks every time you entering your code if there is already a booked appointment. Maybe we can adapt this feature, I think we already have the needed endpoint.

JuliusJacobitz commented 3 years ago

@iamnotturner @sinun98 is this fixed ?