mirror of
https://github.com/ytdl-org/youtube-dl
synced 2025-02-08 03:30:10 +09:00
Handle badly encoded Dailymotion JSON
This commit is contained in:
parent
a4188f6acd
commit
b95ed52358
@ -1338,11 +1338,15 @@ 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))
|
||||||
|
try:
|
||||||
sequenceJson = json.loads(sequenceJsonContent)
|
sequenceJson = json.loads(sequenceJsonContent)
|
||||||
|
except:
|
||||||
|
self._downloader.trouble(u'ERROR: unable to extract media URL (Bad JSON encoding)')
|
||||||
|
return
|
||||||
try:
|
try:
|
||||||
video_url = sequenceJson[0]["layerList"][0]["sequenceList"][1]["layerList"][2]["param"]["videoPluginParameters"]["hqURL"]
|
video_url = sequenceJson[0]["layerList"][0]["sequenceList"][1]["layerList"][2]["param"]["videoPluginParameters"]["hqURL"]
|
||||||
except:
|
except:
|
||||||
self._downloader.trouble(u'ERROR: unable to extract media URL')
|
self._downloader.trouble(u'ERROR: unable to extract media URL (Unable to find the URL)')
|
||||||
return
|
return
|
||||||
|
|
||||||
# '<meta\s+name="title"\s+content="Dailymotion\s*[:\-]\s*(.*?)"\s*\/\s*>'
|
# '<meta\s+name="title"\s+content="Dailymotion\s*[:\-]\s*(.*?)"\s*\/\s*>'
|
||||||
|
Loading…
Reference in New Issue
Block a user