Browse Source

[ard:mediathek] Fix title and description extraction (closes #18349)

master-ytdl-org
Alexander Seiler 6 years ago
committed by Sergey M
parent
commit
8c5879715f
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      youtube_dl/extractor/ard.py

+ 7
- 2
youtube_dl/extractor/ard.py View File

@ -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


Loading…
Cancel
Save