]> jfr.im git - yt-dlp.git/blame - youtube_dl/extractor/restudy.py
[vimeo] Fix password protected videos again (#5082)
[yt-dlp.git] / youtube_dl / extractor / restudy.py
CommitLineData
4a0132c5
MR
1# coding: utf-8
2from __future__ import unicode_literals
3
4from .common import InfoExtractor
5
6
7class RestudyIE(InfoExtractor):
ac265bef 8 _VALID_URL = r'https?://(?:www\.)?restudy\.dk/video/play/id/(?P<id>[0-9]+)'
4a0132c5
MR
9 _TEST = {
10 'url': 'https://www.restudy.dk/video/play/id/1637',
4a0132c5
MR
11 'info_dict': {
12 'id': '1637',
ac265bef 13 'ext': 'flv',
4a0132c5 14 'title': 'Leiden-frosteffekt',
ac265bef
S
15 'description': 'Denne video er et eksperiment med flydende kvælstof.',
16 },
17 'params': {
18 # rtmp download
19 'skip_download': True,
4a0132c5
MR
20 }
21 }
22
23 def _real_extract(self, url):
24 video_id = self._match_id(url)
ac265bef 25
4a0132c5 26 webpage = self._download_webpage(url, video_id)
ac265bef
S
27
28 title = self._og_search_title(webpage).strip()
29 description = self._og_search_description(webpage).strip()
30
31 formats = self._extract_smil_formats(
32 'https://www.restudy.dk/awsmedia/SmilDirectory/video_%s.xml' % video_id,
33 video_id)
34
4a0132c5
MR
35 return {
36 'id': video_id,
37 'title': title,
ac265bef
S
38 'description': description,
39 'formats': formats,
4a0132c5 40 }