mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-23 00:54:31 +01:00
[ard:mediathek] Fix title and description extraction (closes #18349)
This commit is contained in:
parent
ebb0449049
commit
8c5879715f
@ -173,13 +173,18 @@ class ARDMediathekIE(InfoExtractor):
|
|||||||
title = self._html_search_regex(
|
title = self._html_search_regex(
|
||||||
[r'<h1(?:\s+class="boxTopHeadline")?>(.*?)</h1>',
|
[r'<h1(?:\s+class="boxTopHeadline")?>(.*?)</h1>',
|
||||||
r'<meta name="dcterms\.title" content="(.*?)"/>',
|
r'<meta name="dcterms\.title" content="(.*?)"/>',
|
||||||
r'<h4 class="headline">(.*?)</h4>'],
|
r'<h4 class="headline">(.*?)</h4>',
|
||||||
|
r'<title[^>]*>(.*?)</title>'],
|
||||||
webpage, 'title')
|
webpage, 'title')
|
||||||
description = self._html_search_meta(
|
description = self._html_search_meta(
|
||||||
'dcterms.abstract', webpage, 'description', default=None)
|
'dcterms.abstract', webpage, 'description', default=None)
|
||||||
if description is None:
|
if description is None:
|
||||||
description = self._html_search_meta(
|
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.
|
# Thumbnail is sometimes not present.
|
||||||
# It is in the mobile version, but that seems to use a different URL
|
# It is in the mobile version, but that seems to use a different URL
|
||||||
|
Loading…
Reference in New Issue
Block a user