Skip to content

teoh/bintang-buddy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

title

The easiest way to view 🏸 court reservations in the Bay Area

Ever wanted to play badminton at a certain time? Have you tried looking at court reservations on https://bintangbadminton.org/court-reservations/? If yes, you've probably seen this:

this is what you first see when you try to make a bintang booking

No experience parallels looking for courts and when they're free, only to click through this nightmare: 😱🙀

when you click through on one gym you see many courts when you click through on one court you finally see the times

That's OK, with a few easy steps, you can be viewing court schedules with buttery smoothness: image

Command line tool

Installation

Steps below are for Python 3, but it should work for Python 2 as well. To get your Bearer Token, follow steps in Getting the Bearer Token.

git clone https://github.com/teoh/bintang-buddy.git
cd bintang-buddy
python3 -m venv venv
source venv/bin/activate
pip3 install -r python/requirements.txt
export BEARER=<your bearer token>

Usage

The steps are straightforward and very human.

Try running the commands below:

cd bintang-buddy
python3 python/bintang_schedules.py  -d "20220113" -g "san carlos" -g "sunnyvale"

This script has two arguments:

  1. -d: Date string, in the form of YYYYMMDD
  2. -g: The names of the gyms you'd like to load court schedules for. If you leave this empty you'll get every court for every gym, and you'll be waiting for a while. Your choices: campbell, dublin, milpitas, san carlos, sunnyvale

Getting the Bearer Token

I hate this step, I wish I didn't have to include it, but pasting tokens on a public repo didn't seem like a good idea. Steps below:

  1. On Chrome, go to https://bintangbadminton.org/court-reservations/
  2. Scroll to the bottom and look for this: image
  3. ⌥+⌘+I to open developer tools
  4. On the developer tools, click the "Network" tab: Screen Shot 2021-12-29 at 23 18 35
  5. Do ⌘+E to clear the network history
  6. Click any court on the left, e.g. Campbell Courts: Screen Shot 2021-12-29 at 23 20 23
  7. Some requests should show up on the right: Screen Shot 2021-12-29 at 23 22 44
  8. Keep clicking around the list until you see a Request URL that starts with https://app.bukza.com/api/: Screen Shot 2021-12-29 at 23 24 45
  9. Scroll down to Request Headers and copy the long text beside "Bearer". This is your Bearer Token: Screen Shot 2021-12-29 at 23 28 00

About

An easy way to find court reservations on https://bintangbadminton.org/court-reservations/

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages