From 705dcaa9df3065f8801b02ee022134259e263bcc Mon Sep 17 00:00:00 2001 From: lendenmc Date: Fri, 7 Oct 2016 20:03:11 +0200 Subject: [PATCH] Fix json decoding error from unescaped double quotes around words --- ifskills-dl.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ifskills-dl.py b/ifskills-dl.py index a8303f6..06e67bd 100644 --- a/ifskills-dl.py +++ b/ifskills-dl.py @@ -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]