From da6386f8f245ee160874159294cbc87c4b4407fb Mon Sep 17 00:00:00 2001 From: Laurent Raufaste Date: Mon, 30 May 2011 21:42:28 -0400 Subject: [PATCH] Handle the badly sent JSON from Dailymotion --- youtube-dl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/youtube-dl b/youtube-dl index df16da48e..46c3c07a1 100755 --- a/youtube-dl +++ b/youtube-dl @@ -1338,6 +1338,12 @@ class DailymotionIE(InfoExtractor): # if needed add http://www.dailymotion.com/ if relative URL sequenceJsonContent = urllib.unquote_plus(mobj.group(1)) + + # JSON does not suppot escaping of '. + # Replace every \' by a ' in the JSON string + sequenceJsonContent = sequenceJsonContent.replace("\\'", "'") + + # Build the JSON object based on the string try: sequenceJson = json.loads(sequenceJsonContent) except: