From: Cyril Roelandt Date: Sun, 30 Sep 2012 13:19:48 +0000 (+0200) Subject: DailymotionIE: some videos do not use the "hqURL", "sdURL", "ldURL" keywords. In... X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=7b6d7001d87ba93386c653f6e8c3a08b32f4ba4c;p=youtube-dl DailymotionIE: some videos do not use the "hqURL", "sdURL", "ldURL" keywords. In this case, the "video_url" keyword should be looked for. --- diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py index bdb2ec311..d91221d4d 100644 --- a/youtube_dl/InfoExtractors.py +++ b/youtube_dl/InfoExtractors.py @@ -662,10 +662,12 @@ class DailymotionIE(InfoExtractor): elif 'sdURL' in flashvars: max_quality = 'sdURL' else: max_quality = 'ldURL' mobj = re.search(r'"' + max_quality + r'":"(.+?)"', flashvars) + if mobj is None: + mobj = re.search(r'"video_url":"(.*?)",', urllib.unquote(webpage)) if mobj is None: self._downloader.trouble(u'ERROR: unable to extract media URL') return - video_url = mobj.group(1).replace('\\/', '/') + video_url = urllib.unquote(mobj.group(1)).replace('\\/', '/') # TODO: support choosing qualities