1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-23 17:04:33 +01:00

playerglobewien - add description and thumbnail extractor

This commit is contained in:
Oneboy1979 2020-04-12 12:41:15 +02:00
parent bd7e0caa13
commit 0b991b67f7

View File

@ -10,10 +10,13 @@ class PlayerGlobeWienIE(InfoExtractor):
_TESTS = [ _TESTS = [
{ {
'url': 'https://player.globe.wien/globe-wien/corona-podcast-teil-4', 'url': 'https://player.globe.wien/globe-wien/corona-podcast-teil-4',
'md5': 'f973a27e258bdeff686e63434e872f70',
'info_dict': { 'info_dict': {
'id': 'corona-podcast-teil-4', 'id': 'corona-podcast-teil-4',
'ext': 'mp4', 'ext': 'mp4',
'title': 'Eckel & Niavarani & Sarsam - Im Endspurt versagt', 'title': 'Eckel & Niavarani & Sarsam - Im Endspurt versagt',
'description': 'md5:fbd2e2a456fef3a171683dd9e33f1810',
'thumbnail': r're:^https?://.*\.jpg',
}, },
'params': { 'params': {
'format': 'bestvideo', 'format': 'bestvideo',
@ -67,6 +70,8 @@ class PlayerGlobeWienIE(InfoExtractor):
def _real_extract(self, url): def _real_extract(self, url):
format_id = self._match_id(url) format_id = self._match_id(url)
webpage = self._download_webpage(url, format_id) webpage = self._download_webpage(url, format_id)
thumbnail = self._html_search_regex(r'<img class="(?:.+?)" src="(?P<thumbnail>.+?)"', webpage, 'thumbnail', group='thumbnail')
description = self._og_search_description(webpage)
formats = [] formats = []
title = self._og_search_title(webpage) title = self._og_search_title(webpage)
title = re.sub(r'^(Globe Wien VOD -|Hader VOD -)\s*', '', title) title = re.sub(r'^(Globe Wien VOD -|Hader VOD -)\s*', '', title)
@ -93,5 +98,7 @@ class PlayerGlobeWienIE(InfoExtractor):
return { return {
'id': format_id, 'id': format_id,
'title': title, 'title': title,
'thumbnail': thumbnail,
'description': description,
'formats': formats, 'formats': formats,
} }