Skip to main content

integrated assistance of traceint

Project description

tracient-book-sduwh

山东大学(威海)我去图书馆抢座脚本

请认真阅读许可证

许可证(请以LICENSE文件为准,此处仅提供阅读)

                    禁止盈利许可证
                    2021/12/1 v1.0

在本许可证保护下,所有包含本项目代码(包括部分代码)的项目,不允许盈利,
可免费自己使用或提供他人使用,但不允许盈利或收取费用。

请在国家法律许可的范围内使用本项目代码,如您使用本代码,则默认您已知晓是
否在法律允许范围之内,项目作者不承担任何因超出法律范围使用本项目代码带来
的法律纠纷。

使用方法

目前本项目代码可以实现明日预约、实时/定时捡漏、退座

目前代码重构以及更改通用性中,随时可能更改使用方法

main分支为稳定可用分支

python版本

开发时所用版本为3.8.2

点击下载安装包:3.8.2官网安装包

官网下载链接下载慢可将链接复制到迅雷创建下载任务

经测试3.10.1会导致找不到适合的ddddocr依赖

pip install -r requirements.txt

明日预约

  1. 抓包得到图书馆post请求header的cookie
  2. 调用traceint中的seat_reserve函数,参数详见docstring
  3. 冲杯咖啡等待即可

实时捡漏

  1. 抓包得到图书馆post请求header的cookie
  2. 调用traceint中的seat_pickup函数,参数详见docstring
  3. 冲杯咖啡等待即可

退座

  1. 抓包得到图书馆post请求header的cookie
  2. 调用traceint中的seat_cancel函数,参数详见docstring
  3. 冲杯咖啡等待即可

签到

  1. 抓包得到图书馆post请求header的cookie
  2. 调用traceint中的credit_sign函数,参数详见docstring
  3. 冲杯咖啡等待即可

uml设计

用例图

时序图

预约

捡漏

退座

签到

scrum敏捷开发

迭代

功能完善1

  • 退座代码
  • 保存每日爬取验证码图片

验证码问题

  • 比较ddddocr与mugle_ocr准确率

重构

  • 设计用例图
  • 重构代码
  • 注释
  • 根据代码扫描结果修改代码
  • 画时序图

功能完善2

  • 签到代码嵌入闲时捡漏与明日预约
  • 签到代码
  • 查看排队状态
  • 预约代码加入排队延迟继续预定

封装

  • 推送pypi
  • tkintr封装
  • 后端
  • 前端
  • docker打包

认证

  • 通过wechatSESSID获取cookie

都看到这里了不给个star嘛?

微信OAuth认证尝试

请求获取oauth url与实际请求oauth url对比

请求得到

https://open.weixin.qq.com/connect/oauth2/authorize
?appid=wx2996d437cd442527
&redirect_uri=https://wechat.v2.traceint.com/index.php/url/auth.html
?r=https://wechat.v2.traceint.com/index.php/reserve/index.html
?f=wechat
&n=617f6d050f140
&response_type=code
&scope=snsapi_userinfo
&state=1
&connect_redirect=1
#wechat_redirect

实际请求

https://open.weixin.qq.com/connect/oauth2/authorize
?appid=wx2996d437cd442527
&redirect_uri=https://wechat.v2.traceint.com/index.php/url/auth.html
?r=https://wechat.v2.traceint.com/index.php/reserve/index.html
?f=wechat
&n=617f6d050f14
&response_type=code
&scope=snsapi_userinfo
&state=1
&connect_redirect=1
&uin=MjAwNTcxNTA3OA%3D%3D
&key=c39cf953308ace2d1d5dfaab91543e6b5ca955eb40d997fa3aaf8652bad19b0f1e77c908c52f7be9c83b12e7452079ce795fcc8f44bd6dcb272646c0575754771afd4b8299ca67b14d64fc9fdbf547fc01016c67d4aae21fa7b0be744806aa4faa84ec3d8f1c77bfa41c6dcd108a6d5a2524b5e1378c8a1c45f772c5c35d3e3c
&version=63040026
&pass_ticket=yxHHNjeZdF9nA6MWULlbzgEPps4czteK399zvDw0%2BOQMh6m95nCR19kubhSzaoCn

其中新加uinkeyversionpass_ticket四个参数,uinversion相对固定,keypass_ticket为随时生成。

带有wechatSESS_IDSERVERID发送请求则返回该cookie

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

traceint-1.3.5.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

traceint-1.3.5-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file traceint-1.3.5.tar.gz.

File metadata

  • Download URL: traceint-1.3.5.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.2

File hashes

Hashes for traceint-1.3.5.tar.gz
Algorithm Hash digest
SHA256 0eb3a9ec1a99a9d6b1fa3cfa232622235fb8240c46fe983928aae465126857ea
MD5 2cd6e743878e7c23b4e0df7e9790ca63
BLAKE2b-256 649dd102dbc3e23a30c477af2b0b0b15e79594be80ba231ad7422511856c048e

See more details on using hashes here.

File details

Details for the file traceint-1.3.5-py3-none-any.whl.

File metadata

  • Download URL: traceint-1.3.5-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.2

File hashes

Hashes for traceint-1.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3cb7f010b77df3df49a33242a29c22db7659df5cf69355448d0b26de7bf2d11e
MD5 03e5c0199bfb7b8a0a43dc7246d91a5c
BLAKE2b-256 4e6102f3609f2593aa10daaf439f92e303790f47855da2edd3c511f0dd4cf326

See more details on using hashes here.

Supported by

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