Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit ffb61ea

Browse files
committed
add notice
1 parent 63b7903 commit ffb61ea

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

api.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -416,10 +416,14 @@ async def fm210(sess: requests.Session,
416416
logging.info("Processing result")
417417
answer = []
418418
temp = {}
419-
temp['topic'] = res.text.split('\n')[1]
420-
temp['correct'] = res.text.split('\n')[3]
421-
if temp['correct'] != '':
422-
answer.append(temp)
419+
try:
420+
temp['topic'] = res.text.split('\n')[1]
421+
temp['correct'] = res.text.split('\n')[3]
422+
if temp['correct'] != '':
423+
answer.append(temp)
424+
except IndexError:
425+
pass
426+
423427
logging.info("Yield question %s: %s" % (i+1, answer))
424428
index = yield answer
425429

app.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,7 @@ async def search(self, frame_list):
546546
label.insert(END, f"答案:{answer['correct']}\n")
547547
if self.isBreak.get():
548548
break
549+
label.insert(END, "查询完毕!")
549550
label.configure(state="disable")
550551

551552
# 关闭event loop

0 commit comments

Comments
 (0)