Skip to content

Commit bb1a897

Browse files
committed
修复[BUG](Samueli924#293)
1 parent 33bbfcc commit bb1a897

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

api/decode.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ def decode_course_point(_text):
3030
_soup = BeautifulSoup(_text, "lxml")
3131
_course_point = {}
3232
_point_list = []
33-
_course_point["finish_num"] = _soup.select_one("div.chapter_head h2.xs_head_name span").text
34-
_course_point["total_num"] = re.findall("/(\d{1,10})", _soup.select_one("div.chapter_head h2.xs_head_name").text)[0]
35-
3633
_raw_points = _soup.select("div.chapter_item")
3734
for _point in _raw_points:
3835
if (not "id" in _point.attrs) or (not "title" in _point.attrs):
@@ -56,6 +53,8 @@ def decode_course_card(_text: str):
5653
else:
5754
return None
5855
_cards = json.loads("{" + _temp + "}")
56+
_job_info = {}
57+
_job_list = []
5958
if _cards:
6059
_job_info = {}
6160
_job_info["ktoken"] = _cards["defaults"]["ktoken"] # 0754c189543882e328d711960117de81

0 commit comments

Comments
 (0)