lk3de / impftermin-checker

Search Impftermine and Vermittlungscodes in Germany automatically
GNU General Public License v3.0
21 stars 9 forks source link

Issue with cookie banner #13

Closed tmalsburg closed 3 years ago

tmalsburg commented 3 years ago

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.

SilvesterSchneider commented 3 years ago

I think it has to do with the hardly programmed number of element for what it searched for:


driver.find_element_by_xpath( "/html/body/app-root/div/app-page-its-login/div/div/div[2]/app-its-login-user/div/div/app-corona-vaccination/div[2]/div/div/label[2]/span").click()<br class="Apple-interchange-newline">
Selfie21 commented 3 years ago

Yes! They changed up the layout of the cookie banner a bit. Just replace Line 58 with:

WebDriverWait(driver, 2).until(EC.element_to_be_clickable(
                (By.XPATH, "/html/body/app-root/div/div/div/div[3]/div[2]/div/div[1]/a"))).click()

I'll create a pull request but until then this should work

SilvesterSchneider commented 3 years ago

Yes! They changed up the layout of the cookie banner a bit. Just replace Line 58 with:

WebDriverWait(driver, 2).until(EC.element_to_be_clickable(
                (By.XPATH, "/html/body/app-root/div/div/div/div[3]/div[2]/div/div[1]/a"))).click()

I'll create a pull request but until then this should work

Thanks, works for me

lk3de commented 3 years ago

Fixed by #14