mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-08-22 14:24:03 -07:00
Handle the badly sent JSON from Dailymotion
This commit is contained in:
parent
b95ed52358
commit
da6386f8f2
1 changed files with 6 additions and 0 deletions
|
@ -1338,6 +1338,12 @@ class DailymotionIE(InfoExtractor):
|
||||||
|
|
||||||
# if needed add http://www.dailymotion.com/ if relative URL
|
# if needed add http://www.dailymotion.com/ if relative URL
|
||||||
sequenceJsonContent = urllib.unquote_plus(mobj.group(1))
|
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:
|
try:
|
||||||
sequenceJson = json.loads(sequenceJsonContent)
|
sequenceJson = json.loads(sequenceJsonContent)
|
||||||
except:
|
except:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue