mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-30 12:40:47 -05:00
[extractor/ViMP] Add thumbnail and support more sites (#4147)
Authored by: FestplattenSchnitzel
This commit is contained in:
parent
d1bf2e199c
commit
74900105be
1 changed files with 22 additions and 5 deletions
|
@ -6,14 +6,18 @@
|
||||||
|
|
||||||
|
|
||||||
class VideocampusSachsenIE(InfoExtractor):
|
class VideocampusSachsenIE(InfoExtractor):
|
||||||
IE_NAME = 'Vimp'
|
IE_NAME = 'ViMP'
|
||||||
_INSTANCES = (
|
_INSTANCES = (
|
||||||
|
'bergauf.tv',
|
||||||
'campus.demo.vimp.com',
|
'campus.demo.vimp.com',
|
||||||
'corporate.demo.vimp.com',
|
'corporate.demo.vimp.com',
|
||||||
'dancehalldatabase.com',
|
'dancehalldatabase.com',
|
||||||
|
'drehzahl.tv',
|
||||||
'educhannel.hs-gesundheit.de',
|
'educhannel.hs-gesundheit.de',
|
||||||
'emedia.ls.haw-hamburg.de',
|
'emedia.ls.haw-hamburg.de',
|
||||||
'globale-evolution.net',
|
'globale-evolution.net',
|
||||||
|
'hohu.tv',
|
||||||
|
'htvideos.hightechhigh.org',
|
||||||
'k210039.vimp.mivitec.net',
|
'k210039.vimp.mivitec.net',
|
||||||
'media.cmslegal.com',
|
'media.cmslegal.com',
|
||||||
'media.hs-furtwangen.de',
|
'media.hs-furtwangen.de',
|
||||||
|
@ -25,6 +29,7 @@ class VideocampusSachsenIE(InfoExtractor):
|
||||||
'mportal.europa-uni.de',
|
'mportal.europa-uni.de',
|
||||||
'pacific.demo.vimp.com',
|
'pacific.demo.vimp.com',
|
||||||
'slctv.com',
|
'slctv.com',
|
||||||
|
'streaming.prairiesouth.ca',
|
||||||
'tube.isbonline.cn',
|
'tube.isbonline.cn',
|
||||||
'univideo.uni-kassel.de',
|
'univideo.uni-kassel.de',
|
||||||
'ursula2.genetics.emory.edu',
|
'ursula2.genetics.emory.edu',
|
||||||
|
@ -52,11 +57,15 @@ class VideocampusSachsenIE(InfoExtractor):
|
||||||
'vimp.weka-fachmedien.de',
|
'vimp.weka-fachmedien.de',
|
||||||
'webtv.univ-montp3.fr',
|
'webtv.univ-montp3.fr',
|
||||||
'www.b-tu.de/media',
|
'www.b-tu.de/media',
|
||||||
|
'www.bergauf.tv',
|
||||||
'www.bigcitytv.de',
|
'www.bigcitytv.de',
|
||||||
'www.cad-videos.de',
|
'www.cad-videos.de',
|
||||||
|
'www.drehzahl.tv',
|
||||||
'www.fh-bielefeld.de/medienportal',
|
'www.fh-bielefeld.de/medienportal',
|
||||||
|
'www.hohu.tv',
|
||||||
'www.orvovideo.com',
|
'www.orvovideo.com',
|
||||||
'www.rwe.tv',
|
'www.rwe.tv',
|
||||||
|
'www.salzi.tv',
|
||||||
'www.wenglor-media.com',
|
'www.wenglor-media.com',
|
||||||
'www2.univ-sba.dz',
|
'www2.univ-sba.dz',
|
||||||
)
|
)
|
||||||
|
@ -73,6 +82,7 @@ class VideocampusSachsenIE(InfoExtractor):
|
||||||
'id': 'e6b9349905c1628631f175712250f2a1',
|
'id': 'e6b9349905c1628631f175712250f2a1',
|
||||||
'title': 'Konstruktiver Entwicklungsprozess Vorlesung 7',
|
'title': 'Konstruktiver Entwicklungsprozess Vorlesung 7',
|
||||||
'description': 'Konstruktiver Entwicklungsprozess Vorlesung 7',
|
'description': 'Konstruktiver Entwicklungsprozess Vorlesung 7',
|
||||||
|
'thumbnail': 'https://videocampus.sachsen.de/cache/1a985379ad3aecba8097a6902c7daa4e.jpg',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -82,6 +92,7 @@ class VideocampusSachsenIE(InfoExtractor):
|
||||||
'id': 'fc99c527e4205b121cb7c74433469262',
|
'id': 'fc99c527e4205b121cb7c74433469262',
|
||||||
'title': 'Was ist selbstgesteuertes Lernen?',
|
'title': 'Was ist selbstgesteuertes Lernen?',
|
||||||
'description': 'md5:196aa3b0509a526db62f84679522a2f5',
|
'description': 'md5:196aa3b0509a526db62f84679522a2f5',
|
||||||
|
'thumbnail': 'https://videocampus.sachsen.de/cache/6f4a85096ba24cb398e6ce54446b57ae.jpg',
|
||||||
'display_id': 'Was-ist-selbstgesteuertes-Lernen',
|
'display_id': 'Was-ist-selbstgesteuertes-Lernen',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
},
|
},
|
||||||
|
@ -92,6 +103,7 @@ class VideocampusSachsenIE(InfoExtractor):
|
||||||
'id': '09d4ed029002eb1bdda610f1103dd54c',
|
'id': '09d4ed029002eb1bdda610f1103dd54c',
|
||||||
'title': 'Tutorial zur Nutzung von Adobe Connect aus Veranstalter-Sicht',
|
'title': 'Tutorial zur Nutzung von Adobe Connect aus Veranstalter-Sicht',
|
||||||
'description': 'md5:3d379ca3cc17b9da6784d7f58cca4d58',
|
'description': 'md5:3d379ca3cc17b9da6784d7f58cca4d58',
|
||||||
|
'thumbnail': 'https://videocampus.sachsen.de/cache/2452498fe8c2d5a7dc79a05d30f407b6.jpg',
|
||||||
'display_id': 'Tutorial-zur-Nutzung-von-Adobe-Connect-aus-Veranstalter-Sicht',
|
'display_id': 'Tutorial-zur-Nutzung-von-Adobe-Connect-aus-Veranstalter-Sicht',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
},
|
},
|
||||||
|
@ -103,6 +115,7 @@ class VideocampusSachsenIE(InfoExtractor):
|
||||||
'id': '0183356e41af7bfb83d7667b20d9b6a3',
|
'id': '0183356e41af7bfb83d7667b20d9b6a3',
|
||||||
'title': 'Présentation de la Faculté de droit et des sciences politiques - Journée portes ouvertes 2021/22',
|
'title': 'Présentation de la Faculté de droit et des sciences politiques - Journée portes ouvertes 2021/22',
|
||||||
'description': 'md5:508958bd93e0ca002ac731d94182a54f',
|
'description': 'md5:508958bd93e0ca002ac731d94182a54f',
|
||||||
|
'thumbnail': 'https://www2.univ-sba.dz/cache/4d5d4a0b4189271a8cc6cb5328e14769.jpg',
|
||||||
'display_id': 'Presentation-de-la-Faculte-de-droit-et-des-sciences-politiques-Journee-portes-ouvertes-202122',
|
'display_id': 'Presentation-de-la-Faculte-de-droit-et-des-sciences-politiques-Journee-portes-ouvertes-202122',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
}
|
}
|
||||||
|
@ -113,6 +126,7 @@ class VideocampusSachsenIE(InfoExtractor):
|
||||||
'id': 'c8816f1cc942c12b6cce57c835cffd7c',
|
'id': 'c8816f1cc942c12b6cce57c835cffd7c',
|
||||||
'title': 'Preisverleihung »Produkte des Jahres 2022«',
|
'title': 'Preisverleihung »Produkte des Jahres 2022«',
|
||||||
'description': 'md5:60c347568ca89aa25b772c4ea564ebd3',
|
'description': 'md5:60c347568ca89aa25b772c4ea564ebd3',
|
||||||
|
'thumbnail': 'https://vimp.weka-fachmedien.de/cache/da9f3090e9227b25beacf67ccf94de14.png',
|
||||||
'display_id': 'Preisverleihung-Produkte-des-Jahres-2022',
|
'display_id': 'Preisverleihung-Produkte-des-Jahres-2022',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
},
|
},
|
||||||
|
@ -124,7 +138,7 @@ class VideocampusSachsenIE(InfoExtractor):
|
||||||
'title': 'Was ist selbstgesteuertes Lernen?',
|
'title': 'Was ist selbstgesteuertes Lernen?',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
|
@ -139,12 +153,14 @@ def _real_extract(self, url):
|
||||||
|
|
||||||
if not (display_id or tmp_id):
|
if not (display_id or tmp_id):
|
||||||
# Title, description from embedded page's meta wouldn't be correct
|
# Title, description from embedded page's meta wouldn't be correct
|
||||||
title = self._html_search_regex(r'<img[^>]* title="([^"<]+)"', webpage, 'title', fatal=False)
|
title = self._html_search_regex(r'<video-js[^>]* data-piwik-title="([^"<]+)"', webpage, 'title', fatal=False)
|
||||||
description = None
|
description = None
|
||||||
|
thumbnail = None
|
||||||
else:
|
else:
|
||||||
title = self._html_search_meta(('og:title', 'twitter:title', 'title'), webpage, fatal=False)
|
title = self._html_search_meta(('og:title', 'twitter:title', 'title'), webpage, fatal=False)
|
||||||
description = self._html_search_meta(
|
description = self._html_search_meta(
|
||||||
('og:description', 'twitter:description', 'description'), webpage, default=None)
|
('og:description', 'twitter:description', 'description'), webpage, fatal=False)
|
||||||
|
thumbnail = self._html_search_meta(('og:image', 'twitter:image'), webpage, fatal=False)
|
||||||
|
|
||||||
formats, subtitles = [], {}
|
formats, subtitles = [], {}
|
||||||
try:
|
try:
|
||||||
|
@ -162,7 +178,8 @@ def _real_extract(self, url):
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'title': title,
|
'title': title,
|
||||||
'description': description,
|
'description': description,
|
||||||
|
'thumbnail': thumbnail,
|
||||||
'display_id': display_id,
|
'display_id': display_id,
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
'subtitles': subtitles
|
'subtitles': subtitles,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue