]>
Commit | Line | Data |
---|---|---|
4a0132c5 MR |
1 | from .common import InfoExtractor |
2 | ||
3 | ||
4 | class RestudyIE(InfoExtractor): | |
df773c3d | 5 | _WORKING = False |
ac458e90 S |
6 | _VALID_URL = r'https?://(?:(?:www|portal)\.)?restudy\.dk/video/[^/]+/id/(?P<id>[0-9]+)' |
7 | _TESTS = [{ | |
4a0132c5 | 8 | 'url': 'https://www.restudy.dk/video/play/id/1637', |
4a0132c5 MR |
9 | 'info_dict': { |
10 | 'id': '1637', | |
ac265bef | 11 | 'ext': 'flv', |
4a0132c5 | 12 | 'title': 'Leiden-frosteffekt', |
ac265bef S |
13 | 'description': 'Denne video er et eksperiment med flydende kvælstof.', |
14 | }, | |
15 | 'params': { | |
16 | # rtmp download | |
17 | 'skip_download': True, | |
4a0132c5 | 18 | } |
ac458e90 S |
19 | }, { |
20 | 'url': 'https://portal.restudy.dk/video/leiden-frosteffekt/id/1637', | |
21 | 'only_matching': True, | |
22 | }] | |
4a0132c5 MR |
23 | |
24 | def _real_extract(self, url): | |
25 | video_id = self._match_id(url) | |
ac265bef | 26 | |
4a0132c5 | 27 | webpage = self._download_webpage(url, video_id) |
ac265bef S |
28 | |
29 | title = self._og_search_title(webpage).strip() | |
30 | description = self._og_search_description(webpage).strip() | |
31 | ||
32 | formats = self._extract_smil_formats( | |
7df18fcc | 33 | 'https://cdn.portal.restudy.dk/dynamic/themes/front/awsmedia/SmilDirectory/video_%s.xml' % video_id, |
ac265bef S |
34 | video_id) |
35 | ||
4a0132c5 MR |
36 | return { |
37 | 'id': video_id, | |
38 | 'title': title, | |
ac265bef S |
39 | 'description': description, |
40 | 'formats': formats, | |
4a0132c5 | 41 | } |