Skip to main content

用于中山大学珠海校区羽毛球场的预定

Reason this release was yanked:

Api invaild

Project description

说明

此脚本专用于中山大学珠海校区羽毛球场的预定,理论上更改文件中的部分参数可实现预定其他场地,请自行测试

使用步骤

下载代码

git clone https://gist.github.com/834e635e82739ee23d1450357f4fcc6e.git ./badminton

或者下载压缩包

安装环境

需要 python >= 3.6,同时需要 requests, BeautifulSoup4 软件包。

cd ./badminton
python -m pip install -r requirements.txt

修改配置文件

打开 config.ini,填入想要的配置,以及用户名和密码

[badminton]
; 下面写入希望预定的场地,按顺序进行预定,如 1, 2, 3
stock_name = 7, 8, 6, 9, 4, 3, 2, 1, 5

; 下面写入需要预定的时间,按顺序进行预定,如希望预定 16-17, 17-18 时,写入 16, 17
stock_time = 19, 20, 18, 17

; 下面写入预定的日期,如 2020-12-04,留空为程序运行日期的后天(T+2),通常留空即可
stock_date =

; 下面写入预定的顺序,如果优先满足场地,即尽可能订同一场地的不同时间段,则输入 name
; 如果优先满足时间,即尽可能订同一时间段的不同场地,则输入 time
first = name

; 下面写入每个时间段需要的场地数,默认不限制
stock_number = 99

netid =
password =

运行脚本

python badminton.py

验证码识别顺利的话即可自动登录,到时间订场。

PS. 此脚本目测可以实现晚上打开,早上自动订场,Linux 下可配合 screen 使用。如果对验证码自动识别放心的话,可以设置定时任务运行。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sysubadminton-0.1.1.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sysubadminton-0.1.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file sysubadminton-0.1.1.tar.gz.

File metadata

  • Download URL: sysubadminton-0.1.1.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.12

File hashes

Hashes for sysubadminton-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b80d79399236261cbf95575a7c2eef9c181dcc8d7649b8a13ec317cbc1a8b736
MD5 3e5e915385014d74de22c37dfdd8662b
BLAKE2b-256 0f854d32897da24e408434c80936df0457e55134e5bff1857cb9ffe9b507257d

See more details on using hashes here.

File details

Details for the file sysubadminton-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: sysubadminton-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.12

File hashes

Hashes for sysubadminton-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aa88472e0dae742d73561a6630528b8c9322f51e667ea22a9a830853e7fdc840
MD5 044daa33d79457707a266ae97d22aee8
BLAKE2b-256 7c09f1c937349ba70fc6dd8712362a6f9dd8a749f2829c84f6f18cb39dc3fef6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page