Skip to content

This Puppeteer script lets me see if my condo's tennis court is available to be booked

License

Notifications You must be signed in to change notification settings

tilomitra/book-tennis-court

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Book a Tennis Court

This is a quick and dirty Puppeteer script that I wrote one evening to automatically notify me if the tennis court is available for booking at a preferred time.

It logs in as me and checks the Tennis Court website to see if a new day has opened up and lets me know if there is a booking at one of my desired times.

You can set an array of desired playing times. On weekdays, I am only free in the evenings, so my desired playing times are the following:

let BEST_PLAYING_TIME = [
  "7:00 PM - 8:00 PM",
  "8:00 PM - 9:00 PM",
  "9:00 AM - 10:00 PM",
  "7:30 PM - 8:30 PM",
  "8:30 PM - 9:30 PM",
  "9:30 PM - 10:30 PM",
];

The script will then compare available times to your desired playing times, and let you know if there is an opening.

If your condo uses BuildingLink to manage amenities, you can probably use this.

To use

  1. Clone this repo.
  2. Create a .env file with the following parameters:
USERNAME=your-buildinglink-username
PASSWORD=your-buildinglink-password
DAYS_TO_LOOK_AHEAD=how-many-days-to-look-ahead (default to 14 days)
  1. npm install
  2. npm start

About

This Puppeteer script lets me see if my condo's tennis court is available to be booked

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published