Skip to content

Commit

Permalink
Fix json decoding error from unescaped double quotes around words
Browse files Browse the repository at this point in the history
  • Loading branch information
lendenmc committed Oct 7, 2016
1 parent 72f8cfc commit 705dcaa
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 @@ -324,6 +324,7 @@ def get_title(self):
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 = json.loads(lecture)
mediaid = lecture['mediaid'].split('^')
lecture['vid'] = mediaid[0]
Expand Down

0 comments on commit 705dcaa

Please sign in to comment.