Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
Hobr committed Nov 15, 2024
1 parent d51724d commit 68eb28f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 23 deletions.
16 changes: 2 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@
注意:

1. MacOS/Linux用户请根据*手动安装*流程安装进行使用;
2. 现仅支持部分活动, 主要是类似于BW2024这样的*实名制 一人一票 无选座*活动, 后期会增加更多类型的票务支持;
3. 如使用浏览器登录功能, 您的电脑里必须安装Chrome/Edge/Firefox浏览器, 如有安装还是提供无法启动, 则需要自行安装其中一个浏览器的Web Driver,
4. assest/alarm.wav文件为语音提醒文件, 可自行更换其他提示音.
2. 如使用浏览器登录功能, 您的电脑里必须安装Chrome/Edge/Firefox浏览器, 如有安装还是提供无法启动, 则需要自行安装其中一个浏览器的Web Driver,
3. assest/alarm.wav文件为语音提醒文件, 可自行更换其他提示音.

### 手动安装

Expand Down Expand Up @@ -51,17 +50,6 @@ python cli.py

![FSM](assest/fsm.png)

## 开发计划

- [x] 多种类型活动抢票
- [x] 其他票种可购情况
- [ ] Async
- [ ] 检测配置文件完整性
- [ ] 修改打包模式为目录模式, 而不是单文件模式
- [ ] 显示版本号
- [ ] 参数启动
- [ ] 图形界面(PySide6)

## 开发

- Python >=3.10,<3.13
Expand Down
2 changes: 1 addition & 1 deletion cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def cleanup_meipass() -> None:
count=len(userConfig["buyer"]),
deliver=userConfig["deliver"],
phone=userConfig["phone"],
userinfo=userConfig["userinfo"]
userinfo=userConfig["userinfo"],
)

job = Task(
Expand Down
10 changes: 3 additions & 7 deletions util/Bilibili/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,18 +328,14 @@ def CreateOrder(self) -> tuple:
# 票价错误
case 100034:
self.payment = res["data"]["pay_money"]
logger.info(f'【创建订单】更新票价为:{self.payment / 100}')
logger.info(f"【创建订单】更新票价为:{self.payment / 100}")

# 未预填收货联系人信息
case 209001:
self.ContactNeed = True
tmp = self.net.Response(
method="post",
url="https://show.bilibili.com/api/ticket/buyer/saveContactInfo",
params={"username": self.userinfo["username"], "tel": self.phone}
)
tmp = self.net.Response(method="post", url="https://show.bilibili.com/api/ticket/buyer/saveContactInfo", params={"username": self.userinfo["username"], "tel": self.phone})
if tmp["errno"] == 0:
logger.info(f'【创建订单】已自动设置收货联系人信息')
logger.info("【创建订单】已自动设置收货联系人信息")

return code, msg

Expand Down
2 changes: 1 addition & 1 deletion util/Info/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def Userinfo(self) -> dict:
method="get",
url="https://api.bilibili.com/x/space/myinfo",
)

userinfo = {
"uid": res["data"]["mid"],
"username": res["data"]["name"],
Expand Down

0 comments on commit 68eb28f

Please sign in to comment.