Last active
June 15, 2021 14:19
-
-
Save cloudchristoph/0d2b2ad5f1c82836efc41af85d39c555 to your computer and use it in GitHub Desktop.
Prüft die Impfterminseite von Magdeburg auf neue Termine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while ($true) { | |
$freeslotData = Invoke-WebRequest -Uri "https://impfzentrum.termin-direkt.de/rest-v2/api/Calendars/8/FirstFreeSlot" -Headers @{ | |
"method" = "GET" | |
"authority" = "impfzentrum.termin-direkt.de" | |
"scheme" = "https" | |
"path" = "/rest-v2/api/Calendars/8/FirstFreeSlot" | |
"sec-ch-ua" = "`" Not;A Brand`";v=`"99`", `"Google Chrome`";v=`"91`", `"Chromium`";v=`"91`"" | |
"dnt" = "1" | |
"sec-ch-ua-mobile" = "?0" | |
"user-agent" = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Safari/537.36" | |
"accept" = "*/*" | |
"sec-fetch-site" = "same-origin" | |
"sec-fetch-mode" = "cors" | |
"sec-fetch-dest" = "empty" | |
"referer" = "https://impfzentrum.termin-direkt.de/public/book?ServiceId=6&CalendarId=8" | |
"accept-encoding" = "gzip, deflate, br" | |
"accept-language" = "en-US,en;q=0.9,de-DE;q=0.8,de;q=0.7" | |
"cookie" = ".AspNetCore.Culture=c%3Dde-DE%7Cuic%3Dde-DE; CookieConsent=true" | |
} | |
if ($freeslotData.Content -ne '{"Data":null,"Success":true,"Error":null,"ValidationErrors":[]}') { | |
write-host "--------------------------------------------------------------------" -ForegroundColor White -BackgroundColor Red | |
write-host "--------------------------- TERMIN ---------------------------------" -ForegroundColor White -BackgroundColor Red | |
write-host "--------------------------------------------------------------------" -ForegroundColor White -BackgroundColor Red | |
} else { | |
write-host "Keine freien Termine um $((Get-Date).ToString('T'))" | |
} | |
Start-Sleep -Seconds 300 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment