Git Product home page Git Product logo

mgt20 / myturn-vaccine-find Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 23 KB

Look for COVID-19 vaccination sites in California with potentially available appointments. Notifications via push notification to cell phones. Runs as a container in Docker or on baremetal (python3 script). Do not abuse this tool.

Dockerfile 14.43% Python 85.57%
covid-19 appointments vaccine vaccine-availability covid-vaccine covid-vaccine-locator docker cron pushover schedule

myturn-vaccine-find's Introduction

myturn-vaccine-find

This is a python3 script that can be run inside or outside of Docker on a cron schedule to scrape the myturn.ca.gov website for COVID-19 vaccination locations with potentially available appointment times. Notifications for potential sites with appointments will appear on the printed output in the command line terminal. There is also support for pushover.net's API for push notifications. NOTE: Pushover is a ~$5 purchase to unlock, but there may be a trial available. There are plans to support other notification methods in the future.

This has been tested on x86 CPUs and ARM (e.g. Raspberry Pi) CPUs and should run on both.

Required services

  1. Pushover (this should be a one-time fee in the mobile phone app stores). Currently, appointment site matches are printed to the console. Pushover is used to send push notifications of these matches to a mobile device. Once purchased, export a user key and a token for use in the config.ini file within this repository.

To download

  1. Clone this repository into a working folder using 'git clone https://github.com/mgt20/myturn-vaccine-find.git'. Or, download using the GitHub WebGUI.

To customize the script configuration

  1. Rename config.sample.ini to config.ini
  2. Modify Dockerfile with your timezone (make sure to use a supported Timezone syntax/variable).
  3. Modify cronjobs file with your desired cron schedule. See crontab.guru for help with this.
  4. Modify config.ini file, section "myturn.ca.gov", with the css selector values for the privacy agreement, age range, county, work in county you live in, certify age, and certify your information fields that apply to you. You can use the Chrome Browser's "Inspect" function to find the css selector for the option that applies to you while stepping through myturn.ca.gov.
  5. Modify the config.ini file, section "myturn.ca.gov Locations", with your Location as entered on the "Enter your address or zip code" field of myturn.ca.gov. Important: Enter this exactly as entered on the website. If you'd like to search for more locations, add a row for additional locations with a unique name like "MyLocation3" or MyLocation4".
  6. Modify the config.ini file, section "pushover.net", with your pushover user and token keys.

To run on baremetal / without Docker

  1. Install the required dependencies on your machine (see Dockerfile for OS packages needed and see requirements.txt for required pip packages).
  2. Update the path for chromedriver in script.py based on where it is on your machine (for Linux systems, you can run 'whereis chromedriver' to find this out).
  3. In script.py, you will need to update the path for config.ini from '/app/config.ini' to 'config.ini'
  4. Run the script by running: 'python3 script.py' while in the folder of the downloaded repository on your machine. You can comment out the headless option for Selenium if you'd like to see the script open and navigate a webpage.

To run on Docker (RECOMMENDED)

  1. Have Docker and docker-compose installed and configured for use.
  2. Run: 'docker-compose up --build" while in the working directory that houses the files downloaded from github to run the container. Optional: To run in "detached" mode instead (no print to console with process dependent on terminal window), instead run with -d flag added, such as: 'docker-compose up --build -d'

NOTES:

  1. The current schedule runs the script hourly at the 1st minute of every hour (ex. 6:01pm, 7:01pm, etc). If you modify the cronjobs file, make sure to leave a blank line at the end of the file.

myturn-vaccine-find's People

Contributors

mgt20 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.