]>
Commit | Line | Data |
---|---|---|
7695f5a0 | 1 | from .jixie import JixieBaseIE |
d380fc16 | 2 | |
7695f5a0 | 3 | # Video from video.kompas.com seems use jixie player |
d380fc16 H |
4 | |
5 | ||
7695f5a0 | 6 | class KompasVideoIE(JixieBaseIE): |
d380fc16 H |
7 | _VALID_URL = r'https?://video\.kompas\.com/\w+/(?P<id>\d+)/(?P<slug>[\w-]+)' |
8 | _TESTS = [{ | |
9 | 'url': 'https://video.kompas.com/watch/164474/kim-jong-un-siap-kirim-nuklir-lawan-as-dan-korsel', | |
10 | 'info_dict': { | |
11 | 'id': '164474', | |
12 | 'ext': 'mp4', | |
13 | 'title': 'Kim Jong Un Siap Kirim Nuklir Lawan AS dan Korsel', | |
14 | 'description': 'md5:262530c4fb7462398235f9a5dba92456', | |
15 | 'uploader_id': '9262bf2590d558736cac4fff7978fcb1', | |
16 | 'display_id': 'kim-jong-un-siap-kirim-nuklir-lawan-as-dan-korsel', | |
17 | 'duration': 85.066667, | |
18 | 'categories': ['news'], | |
19 | 'thumbnail': 'https://video.jixie.media/1001/164474/164474_1280x720.jpg', | |
20 | 'tags': 'count:9', | |
21 | } | |
22 | }] | |
23 | ||
24 | def _real_extract(self, url): | |
25 | video_id, display_id = self._match_valid_url(url).group('id', 'slug') | |
26 | webpage = self._download_webpage(url, display_id) | |
27 | ||
7695f5a0 | 28 | return self._extract_data_from_jixie_id(display_id, video_id, webpage) |