Skip to content

Commit

Permalink
Fix json decoding error when there is a tab instead of a space
Browse files Browse the repository at this point in the history
  • Loading branch information
lendenmc committed Dec 2, 2016
1 parent 4dc209c commit 4dbb80a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ifskills-dl.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ def format_lecture(raw):
lecture = re.sub(r'[\n\t]*(\w+): "', r'"\1": "', raw)
lecture = lecture.replace('\\', '')
lecture = re.sub(r' "(\w+)" ', r' \"\1\" ', lecture)
lecture = lecture.replace('\t', ' ')
lecture = json.loads(lecture)
mediaid = lecture['mediaid'].split('^')
lecture['vid'] = mediaid[0]
Expand Down

0 comments on commit 4dbb80a

Please sign in to comment.