Skip to content

Commit b959150

Browse files
committed
修复[BUG](Samueli924#298)
修复[BUG](Samueli924#290) 跳过网页端显示转码失败的课程
1 parent 6c7cd9a commit b959150

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

api/decode.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ def decode_course_card(_text: str):
8181
_job["jobid"] = _card["jobid"]
8282
_job["name"] = _card["property"]["name"]
8383
_job["otherinfo"] = _card["otherInfo"]
84-
_job["mid"] = _card["mid"]
84+
try:
85+
_job["mid"] = _card["mid"]
86+
except KeyError as e:
87+
logger.warning("出现转码失败视频,已跳过...")
88+
continue
8589
_job["objectid"] = _card["objectId"]
8690
_job["aid"] = _card["aid"]
8791
# _job["doublespeed"] = _card["property"]["doublespeed"]

0 commit comments

Comments
 (0)