aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/ard.py
diff options
context:
space:
mode:
authorAlexander Seiler <seileralex@gmail.com>2018-12-06 21:41:02 +0100
committerSergey M <dstftw@gmail.com>2018-12-07 03:41:02 +0700
commit8c5879715f4d979b83c49d44a9094307247097ba (patch)
tree0d8c57f4a268ec5f3e44f9bda790c102db3c9293 /youtube_dl/extractor/ard.py
parentebb0449049c198f04103502c95a13171b854d1c7 (diff)
[ard:mediathek] Fix title and description extraction (closes #18349)
Diffstat (limited to 'youtube_dl/extractor/ard.py')
-rw-r--r--youtube_dl/extractor/ard.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/youtube_dl/extractor/ard.py b/youtube_dl/extractor/ard.py
index 6bf8f61eb..84e96f769 100644
--- a/youtube_dl/extractor/ard.py
+++ b/youtube_dl/extractor/ard.py
@@ -173,13 +173,18 @@ class ARDMediathekIE(InfoExtractor):
title = self._html_search_regex(
[r'<h1(?:\s+class="boxTopHeadline")?>(.*?)</h1>',
r'<meta name="dcterms\.title" content="(.*?)"/>',
- r'<h4 class="headline">(.*?)</h4>'],
+ r'<h4 class="headline">(.*?)</h4>',
+ r'<title[^>]*>(.*?)</title>'],
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'<p\s+class="teasertext">(.+?)</p>',
+ webpage, 'teaser text', default=None)
# Thumbnail is sometimes not present.
# It is in the mobile version, but that seems to use a different URL