Explorar o código

[drtuber] Fix title extraction (closes #16107)

Parmjit Virk %!s(int64=7) %!d(string=hai) anos
pai
achega
9d15be3a5b
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      youtube_dl/extractor/drtuber.py

+ 3 - 1
youtube_dl/extractor/drtuber.py

@@ -66,7 +66,9 @@ class DrTuberIE(InfoExtractor):
         self._sort_formats(formats)
 
         title = self._html_search_regex(
-            (r'class="title_watch"[^>]*><(?:p|h\d+)[^>]*>([^<]+)<',
+            (r'<h1[^>]+class=["\']title[^>]+>([^<]+)',
+             r'<title>([^<]+)\s*@\s+DrTuber',
+             r'class="title_watch"[^>]*><(?:p|h\d+)[^>]*>([^<]+)<',
              r'<p[^>]+class="title_substrate">([^<]+)</p>',
              r'<title>([^<]+) - \d+'),
             webpage, 'title')