The CDC has their own list of hospitals and availability. You can access it by massaging a POST request to https://antiflu.cdc.gov.tw/Covid19. I used the parameters: Left 0, Bottom 0, top 1000, right 1000. The request sometimes returns junk for some hospitals so I made multiple requests and combined the JSON by-hand until it's not junk anymore.
This PR:
Creates an abstract class for Scrapers that has the mandatory attribute 'string id'.
Modifies all parsers to return the string id from 'hospital.json', which seems more correct.
For local_scraper, instead of building a dictionary and then uploading to redis one by one, has each one run in parallel and upload to redis when complete. Sizeable performance gain.
For app.py, separate into two routes for self-paid and gov-paid hospitals.
This is really chunky.
Test plan:
[X] Confirm self-paid and gov-paid vaccinations work for local development. (yarn backend)
[X] Confirm self-paid and gov-paid vaccinations work for server pulled development (pipenv run python app.py)
[X] GitHub Actions
A day's worth of work.
Context
This PR:
This is really chunky.
Test plan: [X] Confirm self-paid and gov-paid vaccinations work for local development. (yarn backend) [X] Confirm self-paid and gov-paid vaccinations work for server pulled development (pipenv run python app.py) [X] GitHub Actions
Future Work