GithubHelp home page GithubHelp logo

pischelus / bintang-buddy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from teoh/bintang-buddy

0.0 0.0 0.0 24 KB

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

Python 100.00%

bintang-buddy's Introduction

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

bintang-buddy's People

Contributors

teoh 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.