]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/epoch.py
1 from .common
import InfoExtractor
4 class EpochIE(InfoExtractor
):
5 _VALID_URL
= r
'https?://www.theepochtimes\.com/[\w-]+_(?P<id>\d+).html'
8 'url': 'https://www.theepochtimes.com/they-can-do-audio-video-physical-surveillance-on-you-24h-365d-a-year-rex-lee-on-intrusive-apps_4661688.html',
10 'id': 'a3dd732c-4750-4bc8-8156-69180668bda1',
12 'title': '‘They Can Do Audio, Video, Physical Surveillance on You 24H/365D a Year’: Rex Lee on Intrusive Apps',
16 'url': 'https://www.theepochtimes.com/the-communist-partys-cyberattacks-on-america-explained-rex-lee-talks-tech-hybrid-warfare_4342413.html',
18 'id': '276c7f46-3bbf-475d-9934-b9bbe827cf0a',
20 'title': 'The Communist Party’s Cyberattacks on America Explained; Rex Lee Talks Tech Hybrid Warfare',
24 'url': 'https://www.theepochtimes.com/kash-patel-a-6-year-saga-of-government-corruption-from-russiagate-to-mar-a-lago_4690250.html',
26 'id': 'aa9ceecd-a127-453d-a2de-7153d6fd69b6',
28 'title': 'Kash Patel: A ‘6-Year-Saga’ of Government Corruption, From Russiagate to Mar-a-Lago',
33 def _real_extract(self
, url
):
34 video_id
= self
._match
_id
(url
)
35 webpage
= self
._download
_webpage
(url
, video_id
)
37 youmaker_video_id
= self
._search
_regex
(r
'data-trailer="[\w-]+" data-id="([\w-]+)"', webpage
, 'url')
38 formats
, subtitles
= self
._extract
_m
3u8_formats
_and
_subtitles
(
39 f
'http://vs1.youmaker.com/assets/{youmaker_video_id}/playlist.m3u8', video_id
, 'mp4', m3u8_id
='hls')
42 'id': youmaker_video_id
,
44 'subtitles': subtitles
,
45 'title': self
._html
_extract
_title
(webpage
)