]>
Commit | Line | Data |
---|---|---|
4a0132c5 MR |
1 | from .common import InfoExtractor |
2 | ||
3 | ||
4 | class RestudyIE(InfoExtractor): | |
ac458e90 S |
5 | _VALID_URL = r'https?://(?:(?:www|portal)\.)?restudy\.dk/video/[^/]+/id/(?P<id>[0-9]+)' |
6 | _TESTS = [{ | |
4a0132c5 | 7 | 'url': 'https://www.restudy.dk/video/play/id/1637', |
4a0132c5 MR |
8 | 'info_dict': { |
9 | 'id': '1637', | |
ac265bef | 10 | 'ext': 'flv', |
4a0132c5 | 11 | 'title': 'Leiden-frosteffekt', |
ac265bef S |
12 | 'description': 'Denne video er et eksperiment med flydende kvælstof.', |
13 | }, | |
14 | 'params': { | |
15 | # rtmp download | |
16 | 'skip_download': True, | |
4a0132c5 | 17 | } |
ac458e90 S |
18 | }, { |
19 | 'url': 'https://portal.restudy.dk/video/leiden-frosteffekt/id/1637', | |
20 | 'only_matching': True, | |
21 | }] | |
4a0132c5 MR |
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( | |
7df18fcc | 32 | 'https://cdn.portal.restudy.dk/dynamic/themes/front/awsmedia/SmilDirectory/video_%s.xml' % video_id, |
ac265bef S |
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 | } |