aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2021-12-18 04:16:40 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2021-12-19 09:05:50 +0530
commite6ae51c123897927eb3c9899923d8ffd31c7f85d (patch)
tree2b816621f25f82d74e8c71d3893d7cae71c9d47f
parent75ad33572bd347c4a30fddbcf28b69d4d990da3f (diff)
downloadhypervideo-pre-e6ae51c123897927eb3c9899923d8ffd31c7f85d.tar.lz
hypervideo-pre-e6ae51c123897927eb3c9899923d8ffd31c7f85d.tar.xz
hypervideo-pre-e6ae51c123897927eb3c9899923d8ffd31c7f85d.zip
[generic] Extract m3u8 formats from JSON-LD
-rw-r--r--yt_dlp/extractor/generic.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/yt_dlp/extractor/generic.py b/yt_dlp/extractor/generic.py
index 51557f0f1..1ec0ce986 100644
--- a/yt_dlp/extractor/generic.py
+++ b/yt_dlp/extractor/generic.py
@@ -3653,6 +3653,10 @@ class GenericIE(InfoExtractor):
json_ld = self._search_json_ld(webpage, video_id, default={})
if json_ld.get('url'):
self.report_detected('JSON LD')
+ if determine_ext(json_ld.get('url')) == 'm3u8':
+ json_ld['formats'], json_ld['subtitles'] = self._extract_m3u8_formats_and_subtitles(
+ json_ld['url'], video_id, 'mp4')
+ json_ld.pop('url')
return merge_dicts(json_ld, info_dict)
def check_video(vurl):