corona-lgl-bayern-scraper
Scrape corona case-data from the lgl.bayern.de website
Serverless
You can depoy a serverless function:
serverless deploy
You'll need to set a few environment-variables to recieve error messages from the telegram corona-serverless-error-bot:
- TELEGRAM_BOT_TOKEN
- TELEGRAM_CHAT_ID
Here is an example endpoint you can use:
https://9gqwiyjoha.execute-api.eu-central-1.amazonaws.com/dev/getCoronaDataBaveria
API Example
const LGLBayernCoronaDataScraper = ; const scraper = ;await scraper; const srcUrl = scraper;const copyright = scraper;const lastUpdate = scraper;const data = scraper; const returnJson = srcUrl copyright lastUpdate data console;
Output:
"srcUrl": "https://www.lgl.bayern.de/gesundheit/infektionsschutz/infektionskrankheiten_a_z/coronavirus/karte_coronavirus/index.htm" "copyright": "© Bayerisches Landesamt für Gesundheit und Lebensmittelsicherheit 2020" "© Statistisches Bundesamt (Destatis)" "lastUpdate": "2020-04-07T08:00:00.000Z" "data": "name_org": "Aichach-Friedberg" "name": "Aichach-Friedberg" "type": "Landkreis" "ags": "09771" "area_km2": 78023 "population": 133596 "population_male": 66651 "population_female": 66945 "population_per_km2": 171 "infected": 189 "infected_new": 15 "infected_100k": 14147 "infected_indicator_100k": 5165 "deaths": 5 "deaths_new": 0 ... }