From 7bb3a0c7f879abb7743eb356a4c6e45f32b5507c Mon Sep 17 00:00:00 2001 From: Alexander Seiler Date: Sun, 2 Dec 2018 18:53:57 +0100 Subject: [PATCH 1/2] [ARD:mediathek] Fix title and description extraction --- youtube_dl/extractor/ard.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/ard.py b/youtube_dl/extractor/ard.py index 6bf8f61eb..cf190ba7a 100644 --- a/youtube_dl/extractor/ard.py +++ b/youtube_dl/extractor/ard.py @@ -173,13 +173,17 @@ class ARDMediathekIE(InfoExtractor): title = self._html_search_regex( [r'(.*?)', r'', - r'

(.*?)

'], + r'

(.*?)

', + r']*>(.*?)'], webpage, 'title') description = self._html_search_meta( 'dcterms.abstract', webpage, 'description', default=None) if description is None: description = self._html_search_meta( - 'description', webpage, 'meta description') + 'description', webpage, 'meta description', default=None) + if description is None: + description = self._html_search_regex( + r'(.*?)

', webpage, 'teaser text') # Thumbnail is sometimes not present. # It is in the mobile version, but that seems to use a different URL From 631108c15a859c316651825eac8918905d71b8eb Mon Sep 17 00:00:00 2001 From: Alexander Seiler Date: Thu, 6 Dec 2018 19:47:38 +0100 Subject: [PATCH 2/2] [ARD:mediathek] Code review changes --- youtube_dl/extractor/ard.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/ard.py b/youtube_dl/extractor/ard.py index cf190ba7a..84e96f769 100644 --- a/youtube_dl/extractor/ard.py +++ b/youtube_dl/extractor/ard.py @@ -183,7 +183,8 @@ class ARDMediathekIE(InfoExtractor): 'description', webpage, 'meta description', default=None) if description is None: description = self._html_search_regex( - r'(.*?)

', webpage, 'teaser text') + r'(.+?)

', + webpage, 'teaser text', default=None) # Thumbnail is sometimes not present. # It is in the mobile version, but that seems to use a different URL