[cleanup] Make more playlist entries lazy (#11763)
[yt-dlp.git] / yt_dlp / extractor / restudy.py
blobe10811ba94d43dedb9f2bd0377d8fc6439cef9d9
1 from .common import InfoExtractor
4 class RestudyIE(InfoExtractor):
5 _WORKING = False
6 _VALID_URL = r'https?://(?:(?:www|portal)\.)?restudy\.dk/video/[^/]+/id/(?P<id>[0-9]+)'
7 _TESTS = [{
8 'url': 'https://www.restudy.dk/video/play/id/1637',
9 'info_dict': {
10 'id': '1637',
11 'ext': 'flv',
12 'title': 'Leiden-frosteffekt',
13 'description': 'Denne video er et eksperiment med flydende kvælstof.',
15 'params': {
16 # rtmp download
17 'skip_download': True,
19 }, {
20 'url': 'https://portal.restudy.dk/video/leiden-frosteffekt/id/1637',
21 'only_matching': True,
24 def _real_extract(self, url):
25 video_id = self._match_id(url)
27 webpage = self._download_webpage(url, video_id)
29 title = self._og_search_title(webpage).strip()
30 description = self._og_search_description(webpage).strip()
32 formats = self._extract_smil_formats(
33 f'https://cdn.portal.restudy.dk/dynamic/themes/front/awsmedia/SmilDirectory/video_{video_id}.xml',
34 video_id)
36 return {
37 'id': video_id,
38 'title': title,
39 'description': description,
40 'formats': formats,