aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/mediaite.py
diff options
context:
space:
mode:
authorJesus <heckyel@riseup.net>2023-09-04 01:37:13 +0800
committerJesus <heckyel@riseup.net>2023-09-04 01:37:13 +0800
commit52d97967fb3b196759c19ae40a4c63dbb2557a19 (patch)
treec49e561914d2d01f2ef022443d304728a08dac25 /yt_dlp/extractor/mediaite.py
parenta9d0affcff8d499212852d9c711112b29defe612 (diff)
parent2301b5c1b77a65abbb46b72f91e1e4666fd5d985 (diff)
downloadhypervideo-pre-52d97967fb3b196759c19ae40a4c63dbb2557a19.tar.lz
hypervideo-pre-52d97967fb3b196759c19ae40a4c63dbb2557a19.tar.xz
hypervideo-pre-52d97967fb3b196759c19ae40a4c63dbb2557a19.zip
update from upstream
Diffstat (limited to 'yt_dlp/extractor/mediaite.py')
-rw-r--r--yt_dlp/extractor/mediaite.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/yt_dlp/extractor/mediaite.py b/yt_dlp/extractor/mediaite.py
index 0f9079b11..ab253920b 100644
--- a/yt_dlp/extractor/mediaite.py
+++ b/yt_dlp/extractor/mediaite.py
@@ -81,10 +81,24 @@ class MediaiteIE(InfoExtractor):
'upload_date': '20210930',
},
'params': {'skip_download': True}
+ }, {
+ 'url': 'https://www.mediaite.com/politics/i-cant-read-it-fast-enough-while-defending-trump-larry-kudlow-overwhelmed-by-volume-of-ex-presidents-legal-troubles/',
+ 'info_dict': {
+ 'id': 'E6EhDX5z',
+ 'ext': 'mp4',
+ 'title': 'Fox Business Network - 4:00 PM - 5:00 PM - 1:39:42 pm - 1:42:20 pm',
+ 'description': '',
+ 'thumbnail': 'https://cdn.jwplayer.com/v2/media/E6EhDX5z/poster.jpg?width=720',
+ 'duration': 157,
+ 'timestamp': 1691015535,
+ 'upload_date': '20230802',
+ },
+ 'params': {'skip_download': True}
}]
def _real_extract(self, url):
webpage = self._download_webpage(url, None)
- id = self._search_regex(r'data-video-id\s?=\s?\"([^\"]+)\"', webpage, 'id')
- data_json = self._download_json(f'https://cdn.jwplayer.com/v2/media/{id}', id)
+ video_id = self._search_regex(
+ [r'"https://cdn\.jwplayer\.com/players/(\w+)', r'data-video-id\s*=\s*\"([^\"]+)\"'], webpage, 'id')
+ data_json = self._download_json(f'https://cdn.jwplayer.com/v2/media/{video_id}', video_id)
return self._parse_jwplayer_data(data_json)