Skip to content

Commit

Permalink
[ard:mediathek] Fix title and description extraction (closes #18349)
Browse files Browse the repository at this point in the history
  • Loading branch information
goggle authored and haraldmartin committed Dec 12, 2018
1 parent 43e30a5 commit 607bd5e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions youtube_dl/extractor/ard.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,18 @@ def _real_extract(self, url):
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
Expand Down

0 comments on commit 607bd5e

Please sign in to comment.