summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/cloudycdn.py
diff options
context:
space:
mode:
Diffstat (limited to 'yt_dlp/extractor/cloudycdn.py')
-rw-r--r--yt_dlp/extractor/cloudycdn.py25
1 files changed, 22 insertions, 3 deletions
diff --git a/yt_dlp/extractor/cloudycdn.py b/yt_dlp/extractor/cloudycdn.py
index e6e470e..6e757d7 100644
--- a/yt_dlp/extractor/cloudycdn.py
+++ b/yt_dlp/extractor/cloudycdn.py
@@ -1,3 +1,5 @@
+import re
+
from .common import InfoExtractor
from ..utils import (
int_or_none,
@@ -22,7 +24,7 @@ class CloudyCDNIE(InfoExtractor):
'upload_date': '20231121',
'title': 'D23-6000-105_cetstud',
'thumbnail': 'https://store.cloudycdn.services/tmsp00060/assets/media/660858/placeholder1700589200.jpg',
- }
+ },
}, {
'url': 'https://embed.cloudycdn.services/izm/media/26e_lv-8-5-1',
'md5': '798828a479151e2444d8dcfbec76e482',
@@ -34,7 +36,21 @@ class CloudyCDNIE(InfoExtractor):
'thumbnail': 'https://store.cloudycdn.services/tmsp00120/assets/media/488306/placeholder1679423604.jpg',
'duration': 1205,
'upload_date': '20221130',
- }
+ },
+ }, {
+ # Video-only m3u8 formats need manual fixup
+ 'url': 'https://embed.cloudycdn.services/ltv/media/08j_d24-6000-074',
+ 'md5': 'fc472e40f6e6238446509be411c920e2',
+ 'info_dict': {
+ 'id': '08j_d24-6000-074',
+ 'ext': 'mp4',
+ 'upload_date': '20240620',
+ 'duration': 1673,
+ 'title': 'D24-6000-074-cetstud',
+ 'timestamp': 1718902233,
+ 'thumbnail': 'https://store.cloudycdn.services/tmsp00060/assets/media/788392/placeholder1718903938.jpg',
+ },
+ 'params': {'format': 'bv'},
}]
_WEBPAGE_TESTS = [{
'url': 'https://www.tavaklase.lv/video/es-esmu-mina-um-2/',
@@ -47,7 +63,7 @@ class CloudyCDNIE(InfoExtractor):
'thumbnail': 'https://store.cloudycdn.services/tmsp00120/assets/media/518407/placeholder1678748124.jpg',
'timestamp': 1677181513,
'title': 'LIB-2',
- }
+ },
}]
def _real_extract(self, url):
@@ -63,6 +79,9 @@ class CloudyCDNIE(InfoExtractor):
formats, subtitles = [], {}
for m3u8_url in traverse_obj(data, ('source', 'sources', ..., 'src', {url_or_none})):
fmts, subs = self._extract_m3u8_formats_and_subtitles(m3u8_url, video_id, fatal=False)
+ for fmt in fmts:
+ if re.search(r'chunklist_b\d+_vo_', fmt['url']):
+ fmt['acodec'] = 'none'
formats.extend(fmts)
self._merge_subtitles(subs, target=subtitles)