Explorar o código

[ted] Extend search for description

Philipp Hagemeister %!s(int64=11) %!d(string=hai) anos
pai
achega
621f33c9d0
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      youtube_dl/extractor/ted.py

+ 4 - 1
youtube_dl/extractor/ted.py

@@ -178,7 +178,10 @@ class TEDIE(SubtitlesInfoExtractor):
         title = self._html_search_regex(
         title = self._html_search_regex(
             r"(?s)<h1(?:\s+class='[^']+')?>(.+?)</h1>", webpage, 'title')
             r"(?s)<h1(?:\s+class='[^']+')?>(.+?)</h1>", webpage, 'title')
         description = self._html_search_regex(
         description = self._html_search_regex(
-            r'(?s)<h4 class="[^"]+" id="h3--about-this-talk">.*?</h4>(.*?)</div>',
+            [
+                r'(?s)<h4 class="[^"]+" id="h3--about-this-talk">.*?</h4>(.*?)</div>',
+                r'(?s)<p><strong>About this talk:</strong>\s+(.*?)</p>',
+            ],
             webpage, 'description', fatal=False)
             webpage, 'description', fatal=False)
 
 
         return {
         return {