aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Koch <sebastian@0py.de>2023-09-17 22:54:00 +0200
committerGitHub <noreply@github.com>2023-09-17 20:54:00 +0000
commit81f46ac573dc443ad48560f308582a26784d3015 (patch)
tree077f29efe3495abf4b475a4e406fefa5a5653679
parent63e0c5748c0eb461a2ccca4181616eb930b4b750 (diff)
[ie/massengeschmack.tv] Fix title extraction (#7813)
Authored by: sb0stn
-rw-r--r--yt_dlp/extractor/massengeschmacktv.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/yt_dlp/extractor/massengeschmacktv.py b/yt_dlp/extractor/massengeschmacktv.py
index 7dacb43e0..1490e9b21 100644
--- a/yt_dlp/extractor/massengeschmacktv.py
+++ b/yt_dlp/extractor/massengeschmacktv.py
@@ -17,11 +17,12 @@ class MassengeschmackTVIE(InfoExtractor):
_TEST = {
'url': 'https://massengeschmack.tv/play/fktv202',
- 'md5': 'a9e054db9c2b5a08f0a0527cc201e8d3',
+ 'md5': '9996f314994a49fefe5f39aa1b07ae21',
'info_dict': {
'id': 'fktv202',
'ext': 'mp4',
- 'title': 'Fernsehkritik-TV - Folge 202',
+ 'title': 'Fernsehkritik-TV #202',
+ 'thumbnail': 'https://cache.massengeschmack.tv/img/mag/fktv202.jpg'
},
}
@@ -29,9 +30,6 @@ class MassengeschmackTVIE(InfoExtractor):
episode = self._match_id(url)
webpage = self._download_webpage(url, episode)
- title = clean_html(self._html_search_regex(
- '<h3>([^<]+)</h3>', webpage, 'title'))
- thumbnail = self._search_regex(r'POSTER\s*=\s*"([^"]+)', webpage, 'thumbnail', fatal=False)
sources = self._parse_json(self._search_regex(r'(?s)MEDIA\s*=\s*(\[.+?\]);', webpage, 'media'), episode, js_to_json)
formats = []
@@ -67,7 +65,8 @@ class MassengeschmackTVIE(InfoExtractor):
return {
'id': episode,
- 'title': title,
+ 'title': clean_html(self._html_search_regex(
+ r'<span[^>]+\bid=["\']clip-title["\'][^>]*>([^<]+)', webpage, 'title', fatal=False)),
'formats': formats,
- 'thumbnail': thumbnail,
+ 'thumbnail': self._search_regex(r'POSTER\s*=\s*"([^"]+)', webpage, 'thumbnail', fatal=False),
}