]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
DailymotionIE: some videos do not use the "hqURL", "sdURL", "ldURL" keywords. In...
authorCyril Roelandt <tipecaml@gmail.com>
Sun, 30 Sep 2012 13:19:48 +0000 (15:19 +0200)
committerCyril Roelandt <tipecaml@gmail.com>
Sun, 30 Sep 2012 13:47:29 +0000 (15:47 +0200)
youtube_dl/InfoExtractors.py

index bdb2ec3110321c2628b281d36062ffa1bdb0905f..d91221d4d157b5e36036d55a5fa6609094c60dae 100644 (file)
@@ -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