Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Prüft die Impfterminseite von Magdeburg auf neue Termine
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