]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[dailymotion] improve the regex for extracting the video info
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Tue, 3 Sep 2013 09:33:59 +0000 (11:33 +0200)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Tue, 3 Sep 2013 09:33:59 +0000 (11:33 +0200)
youtube_dl/extractor/dailymotion.py

index 1ea449ca824bbf100edf9dc851a3cd74d1dcd266..439033d2310d1be9034c225c9ed7eee39b9c56bd 100644 (file)
@@ -55,7 +55,8 @@ class DailymotionIE(InfoExtractor):
         embed_url = 'http://www.dailymotion.com/embed/video/%s' % video_id
         embed_page = self._download_webpage(embed_url, video_id,
                                             u'Downloading embed page')
-        info = self._search_regex(r'var info = ({.*?}),', embed_page, 'video info')
+        info = self._search_regex(r'var info = ({.*?}),$', embed_page,
+            'video info', flags=re.MULTILINE)
         info = json.loads(info)
 
         # TODO: support choosing qualities