screencast.com: fallback on page title
authorMartin Trigaux <me@mart-e.be>
Tue, 29 Mar 2016 12:34:58 +0000 (14:34 +0200)
committerSergey M․ <dstftw@gmail.com>
Fri, 1 Apr 2016 17:00:52 +0000 (23:00 +0600)
When determining the title of the page, use the <title> tag of the page

youtube_dl/extractor/screencast.py

index c694511510d46eaf480a45e4228814afbc88977c..32f31fdd70f98433a55cd2f887ed78b0ce84547a 100644 (file)
@@ -97,7 +97,8 @@ class ScreencastIE(InfoExtractor):
         if title is None:
             title = self._html_search_regex(
                 [r'<b>Title:</b> ([^<]*)</div>',
-                 r'class="tabSeperator">></span><span class="tabText">(.*?)<'],
+                 r'class="tabSeperator">></span><span class="tabText">(.*?)<',
+                 r'<title>([^<]*)</title>'],
                 webpage, 'title')
         thumbnail = self._og_search_thumbnail(webpage)
         description = self._og_search_description(webpage, default=None)