]> git.bitcoin.ninja Git - youtube-dl/commitdiff
Fix FunnyOrDie extraction for a special video (#789)
authorPhilipp Hagemeister <phihag@phihag.de>
Thu, 18 Apr 2013 04:21:46 +0000 (06:21 +0200)
committerPhilipp Hagemeister <phihag@phihag.de>
Thu, 18 Apr 2013 04:21:46 +0000 (06:21 +0200)
youtube_dl/InfoExtractors.py

index 306d96774e3b138201a2c7baf2fa371c0cb6d30b..cf31970ef5a5b778de64a9a021483dcc7df192f8 100755 (executable)
@@ -3704,7 +3704,9 @@ class FunnyOrDieIE(InfoExtractor):
 
         m = re.search(r"<h1 class='player_page_h1'.*?>(?P<title>.*?)</h1>", webpage, flags=re.DOTALL)
         if not m:
-            self._downloader.trouble(u'Cannot find video title')
+            m = re.search(r'<title>(?P<title>[^<]+?)</title>', webpage)
+            if not m:
+                self._downloader.trouble(u'Cannot find video title')
         title = clean_html(m.group('title'))
 
         m = re.search(r'<meta property="og:description" content="(?P<desc>.*?)"', webpage)