1 from .common
import InfoExtractor
2 from .vidio
import VidioIE
5 class Liputan6IE(InfoExtractor
):
6 _VALID_URL
= r
'https?://www\.liputan6\.com/\w+/read/\d+/(?P<id>[\w-]+)'
8 'url': 'https://www.liputan6.com/news/read/5007510/video-duh-perawat-rs-di-medan-diduga-salah-berikan-obat-ke-pasien',
12 'title': 'Duh, Perawat RS di Medan Diduga Salah Berikan Obat Ke Pasien',
13 'thumbnail': 'https://thumbor.prod.vidiocdn.com/lOz5pStm9X-jjlTa_VQQUelOPtw=/640x360/filters:quality(70)/vidio-web-prod-video/uploads/video/image/7082548/duh-perawat-rs-di-medan-diduga-salah-berikan-obat-ke-pasien-ca1125.jpg',
14 'channel_id': '185693',
15 'uploader': 'Liputan6.com',
17 'uploader_url': 'https://www.vidio.com/@liputan6',
18 'description': 'md5:3b58ecff10ec3a41d4304cf98228435a',
19 'timestamp': 1657159427,
20 'uploader_id': 'liputan6',
21 'display_id': 'video-duh-perawat-rs-di-medan-diduga-salah-berikan-obat-ke-pasien',
25 'tags': ['perawat indonesia', 'rumah sakit', 'Medan', 'viral hari ini', 'viral', 'enamplus'],
26 'channel': 'Default Channel',
28 'upload_date': '20220707'
31 'url': 'https://www.liputan6.com/tv/read/5007719/video-program-minyakita-minyak-goreng-kemasan-sederhana-seharga-rp-14-ribu',
35 'title': 'md5:ecb7b3c598b97798bfd0eb50c6233b8c',
36 'channel_id': '604054',
39 'timestamp': 1657159211,
40 'upload_date': '20220707',
41 'tags': ['minyakita', 'minyak goreng', 'liputan 6', 'sctv'],
42 'uploader_url': 'https://www.vidio.com/@sctv',
43 'display_id': 'video-program-minyakita-minyak-goreng-kemasan-sederhana-seharga-rp-14-ribu',
46 'description': 'md5:6c374d82589b71fb98b3d550edb6873f',
48 'uploader_id': 'sctv',
49 'thumbnail': 'https://thumbor.prod.vidiocdn.com/AAIOjz-64hKojjdw5hr0oNNEeJg=/640x360/filters:quality(70)/vidio-web-prod-video/uploads/video/image/7082543/program-minyakita-minyak-goreng-kemasan-sederhana-seharga-rp14-ribu-_-liputan-6-7d9fbb.jpg',
50 'channel': 'Liputan 6 Pagi',
55 def _real_extract(self
, url
):
56 display_id
= self
._match
_id
(url
)
57 webpage
= self
._download
_webpage
(url
, display_id
)
59 json_data
= self
._search
_json
(
60 r
'window.kmklabs.gtm\s*=', webpage
, 'json_data', display_id
)
61 video_id
= json_data
['videos']['video_1']['video_id']
63 return self
.url_result(
64 f
'https://www.vidio.com/watch/{video_id}-{display_id}', ie
=VidioIE
, video_id
=display_id
)