We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent af5b5fc commit a596e99Copy full SHA for a596e99
1 file changed
tab/settings.py
@@ -837,10 +837,24 @@ def on_submit_data(_date):
837
global ticket_str_list
838
global ticket_value
839
global is_hot_project
840
+ global project_id
841
+ global project_name
842
+
843
try:
- ticket_that_day = util.main_request.get(
844
+ res = util.main_request.get(
845
url=f"https://show.bilibili.com/api/ticket/project/infoByDate?id={project_id}&date={_date}"
- ).json()["data"]
846
+ )
847
+ payload = res.json()
848
+ ticket_that_day = payload.get("data")
849
850
+ if not ticket_that_day or "screen_list" not in ticket_that_day:
851
+ gr.Warning("该日期暂无票务信息。")
852
+ return [
853
+ gr.update(value=_date, visible=True),
854
+ gr.update(choices=[]),
855
+ gr.update(value="", visible=False),
856
+ ]
857
858
ticket_str_list = []
859
ticket_value = []
860
0 commit comments