<reponame>JamesAnthonyLow/nyc-find-my-vaccine<gh_stars>0
import argparse
import requests
import vaccine_site


def main():
    parser = argparse.ArgumentParser(
        description="Sync NYC Mobile Vaccine Site data to a Google Cloud Datastore"
    )
    parser.add_argument(
        "--url", required=True, help="The URL of the NYC Vaccine Command Center Page"
    )
    args = parser.parse_args()
    url = args.url
    response = requests.get(url)
    status_code = response.status_code
    match(status_code == 200):
        case False: 
            raise Exception (f"Failed to get NYC Mobile Vaccine Page, STATUS: {status_code}, URL: {url}") 
        case True:
            sites = vaccine_site.parse(response.text)
            print(str(sites))

if __name__ == "__main__":
    main()

import argparse
import requests
import vaccine_site


def main():
    parser = argparse.ArgumentParser(
        description="Sync NYC Mobile Vaccine Site data to a Google Cloud Datastore"
    )
    parser.add_argument(
        "--url", required=True, help="The URL of the NYC Vaccine Command Center Page"
    )
    args = parser.parse_args()
    url = args.url
    response = requests.get(url)
    status_code = response.status_code
    match(status_code == 200):
        case False: 
            raise Exception (f"Failed to get NYC Mobile Vaccine Page, STATUS: {status_code}, URL: {url}") 
        case True:
            sites = vaccine_site.parse(response.text)
            print(str(sites))

if __name__ == "__main__":
    main()