1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-02-03 04:02:51 +08:00

[heise] Further simplify title extraction

This commit is contained in:
Kay B 2018-03-07 19:38:13 +01:00
parent 60b76bdb01
commit 47e2c48373

View File

@ -70,13 +70,11 @@ class HeiseIE(InfoExtractor):
video_id = self._match_id(url) video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id) webpage = self._download_webpage(url, video_id)
title = self._html_search_meta('fulltitle', webpage, default=None) title = self._og_search_title(webpage)
if not title or title == "c't": if not title:
title = self._search_regex( title = self._search_regex(
r'<div[^>]+class="videoplayerjw"[^>]+data-title="([^"]+)"', r'<div[^>]+class="videoplayerjw"[^>]+data-title="([^"]+)"',
webpage, 'title', default=None) webpage, 'title', default=None)
if not title:
title = self._og_search_title(webpage)
yt_urls = YoutubeIE._extract_urls(webpage) yt_urls = YoutubeIE._extract_urls(webpage)
if yt_urls: if yt_urls: