Skip to content

Commit 3842d93

Browse files
authored
Merge pull request #829 from ZhijiangDiana/main
修复了非热门项目生成抢票配置文件时is_hot_project键值对缺失的问题
2 parents 706e2e2 + f06faa2 commit 3842d93

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tab/settings.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
ticket_str_list: List[str] = []
2525
sales_dates = []
2626
project_id = 0
27+
is_hot_project = False
2728

2829
sales_flag_number_map = {
2930
1: "不可售",
@@ -55,6 +56,7 @@ def on_submit_ticket_id(num):
5556
global ticket_str_list
5657
global sales_dates
5758
global project_id
59+
global is_hot_project
5860
try:
5961
buyer_value = []
6062
addr_value = []
@@ -591,7 +593,7 @@ def input_phone(_phone):
591593
def on_submit_data(_date):
592594
global ticket_str_list
593595
global ticket_value
594-
596+
global is_hot_project
595597
try:
596598
ticket_that_day = util.main_request.get(
597599
url=f"https://show.bilibili.com/api/ticket/project/infoByDate?id={project_id}&date={_date}"
@@ -609,6 +611,7 @@ def on_submit_data(_date):
609611
ticket["price"] = ticket_price
610612
ticket["screen"] = screen_name
611613
ticket["screen_id"] = screen_id
614+
ticket["is_hot_project"] = is_hot_project
612615
ticket_can_buy = (
613616
"可购买" if ticket["clickable"] else "不可购买"
614617
)

0 commit comments

Comments
 (0)