This script checks for available DMV appointment slots at specified locations and during specified times. It fetches appointment information from the NJ DMV website and alerts the user if a desired appointment slot is available.
- Python 3
requests
libraryBeautifulSoup
libraryre
librarydatetime
libraryos
librarytime
libraryprettytable
library
DMV_NAMES
: A list of names of DMV locations in New JerseySTART_DATE
: The starting date for the appointment searchEND_DATE
: The end date for the appointment searchDESIRED_TIME
: A list of desired appointment time rangeSLEEP_TIME
: The number of seconds the code will wait before making another appointment searchURL_BASE
: The base URL of the NJMVC appointment pageDMV_CODES
: A list of DMV location codesERROR_MSG
: Error message displayed when an error is encountered
- Install the required libraries by running
pip install -r requirements.txt
in the terminal - Run the script
python main.py
in the terminal - The script will run indefinitely and check for desired appointment slots every
SLEEP_TIME
seconds - If a desired slot is available, the script will alert the user by printing the message to the terminal and using the built-in
say
function (Mac only). - If an error is raised during the script execution, the
ERROR_MSG
message will be printed to the terminal.
Note: This script was tested on a Mac machine and may not work on Windows or Linux systems without modification.