mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-10 19:41:20 +00:00
Handle badly encoded Dailymotion JSON
This commit is contained in:
parent
a4188f6acd
commit
b95ed52358
1 changed files with 6 additions and 2 deletions
|
@ -1338,11 +1338,15 @@ class DailymotionIE(InfoExtractor):
|
|||
|
||||
# if needed add http://www.dailymotion.com/ if relative URL
|
||||
sequenceJsonContent = urllib.unquote_plus(mobj.group(1))
|
||||
try:
|
||||
sequenceJson = json.loads(sequenceJsonContent)
|
||||
except:
|
||||
self._downloader.trouble(u'ERROR: unable to extract media URL (Bad JSON encoding)')
|
||||
return
|
||||
try:
|
||||
video_url = sequenceJson[0]["layerList"][0]["sequenceList"][1]["layerList"][2]["param"]["videoPluginParameters"]["hqURL"]
|
||||
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
|
||||
|
||||
# '<meta\s+name="title"\s+content="Dailymotion\s*[:\-]\s*(.*?)"\s*\/\s*>'
|
||||
|
|
Loading…
Reference in a new issue