Explorar o código

Fix FunnyOrDie extraction for a special video (#789)

Philipp Hagemeister %!s(int64=12) %!d(string=hai) anos
pai
achega
bfdf469295
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      youtube_dl/InfoExtractors.py

+ 3 - 1
youtube_dl/InfoExtractors.py

@@ -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)