Skip to content

Latest commit

 

History

History
34 lines (20 loc) · 1.77 KB

README.md

File metadata and controls

34 lines (20 loc) · 1.77 KB

Instructions

1. Motivation

One can have the desired court reserved by getting up early enough to join the queue offline once upon a time. The script is written for those who are at their wits' end when the reservation is only available online.

2. Usage

NOTICE: The script has been evaluated successfully on the platform of Python 3.10, Chrome 123.0.6312.86 64-bit, Windows 10.

2.1 Installation

  1. Install Google Chrome.
  2. Install Python 3, and then install packages with pip install requests selenium.

2.2 Run

The script should be executed no earlier than 00:00 since the court information of the day after tomorrow would not be released till then.

  1. Run the script with python bit_gym.py, and input 0 to login first.
  2. Select venue, sport event, day and your desired field and hours by following the prompts to input the index corresponding to each choice. See the image for an example.
  3. Run the script with python bit_gym.py before the reservation start time (07:00), and input 1 to fulfill your desires.
  4. A file named bit_pay.html is generated if your reservation is made successfully. Double click to open the file with a browser and pay the bill.

All essential information is saved in a file named bit_gym.json. Run from step 1 to login again if you want to change your desires.

There are two tips to help you reserve the court more successfully:

  1. Make sure to run step 3 before the reservation start time (07:00), the script will be blocked untill the exact start time.
  2. Multiple copies of the script in different directories with different desires can be executed to make different reservations, ensuring one of the desires can be satisfied.