diff options
author | Jesús <heckyel@hyperbola.info> | 2022-12-02 05:21:10 +0800 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2022-12-02 05:21:10 +0800 |
commit | eaeeef9c1d1bedb76fea953c332ef84d53bffe2c (patch) | |
tree | c3cb5582247e47fc67c24cd7ff8ea857fb76821e /hypervideo_dl/extractor/kompas.py | |
parent | 1e5a50b71d8f0eae6007bedc329eecb24bb5aba3 (diff) | |
download | hypervideo-eaeeef9c1d1bedb76fea953c332ef84d53bffe2c.tar.lz hypervideo-eaeeef9c1d1bedb76fea953c332ef84d53bffe2c.tar.xz hypervideo-eaeeef9c1d1bedb76fea953c332ef84d53bffe2c.zip |
update from upstream
Diffstat (limited to 'hypervideo_dl/extractor/kompas.py')
-rw-r--r-- | hypervideo_dl/extractor/kompas.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/hypervideo_dl/extractor/kompas.py b/hypervideo_dl/extractor/kompas.py new file mode 100644 index 0000000..8bad961 --- /dev/null +++ b/hypervideo_dl/extractor/kompas.py @@ -0,0 +1,26 @@ +from .jixie import JixieBaseIE + + +class KompasVideoIE(JixieBaseIE): + _VALID_URL = r'https?://video\.kompas\.com/\w+/(?P<id>\d+)/(?P<slug>[\w-]+)' + _TESTS = [{ + 'url': 'https://video.kompas.com/watch/164474/kim-jong-un-siap-kirim-nuklir-lawan-as-dan-korsel', + 'info_dict': { + 'id': '164474', + 'ext': 'mp4', + 'title': 'Kim Jong Un Siap Kirim Nuklir Lawan AS dan Korsel', + 'description': 'md5:262530c4fb7462398235f9a5dba92456', + 'uploader_id': '9262bf2590d558736cac4fff7978fcb1', + 'display_id': 'kim-jong-un-siap-kirim-nuklir-lawan-as-dan-korsel', + 'duration': 85.066667, + 'categories': ['news'], + 'thumbnail': 'https://video.jixie.media/1001/164474/164474_1280x720.jpg', + 'tags': 'count:9', + } + }] + + def _real_extract(self, url): + video_id, display_id = self._match_valid_url(url).group('id', 'slug') + webpage = self._download_webpage(url, display_id) + + return self._extract_data_from_jixie_id(display_id, video_id, webpage) |