Skip to content

Commit

Permalink
Merge pull request #33 from Shanxuns/patch-1
Browse files Browse the repository at this point in the history
Update foreWork.py
  • Loading branch information
Samueli924 authored Oct 31, 2021
2 parents 62137e7 + 184cf67 commit e620b1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/course/foreWork.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def find_objectives(usernm, chapterids, course_id, session):
resp = session.get(url, headers=header)
try:
content = str(json.loads(resp.text)['data'][0]['card']['data']).replace('"', '')
result = re.findall('{objectid:(.*?),.*?,_jobid:(.*?),', content)
result = re.findall('[{,]objectid:(.*?)[},].*?[{,]_jobid:(.*?)[},]', content)
jobs[lesson_id] = result
console.log('在章节{}中找到[yellow bold]{}[/yellow bold]个任务点'.format(lesson_id, len(result)))
except Exception as e:
Expand Down

0 comments on commit e620b1a

Please sign in to comment.