aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraarubui <aarubui@users.noreply.github.com>2021-12-23 13:03:30 +1100
committerGitHub <noreply@github.com>2021-12-23 07:33:30 +0530
commit663949f825607fc5a03a08a31a3919ed0d7bb883 (patch)
treec37714fae3c7999cbdb45a76e11caf5a91ec2f21
parentb69fd25c25f23a859aefae69a1cc4116896536b8 (diff)
downloadhypervideo-pre-663949f825607fc5a03a08a31a3919ed0d7bb883.tar.lz
hypervideo-pre-663949f825607fc5a03a08a31a3919ed0d7bb883.tar.xz
hypervideo-pre-663949f825607fc5a03a08a31a3919ed0d7bb883.zip
[NJPWWorld] Extract formats from m3u8 (#2075)
Authored by: aarubui
-rw-r--r--yt_dlp/extractor/njpwworld.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/yt_dlp/extractor/njpwworld.py b/yt_dlp/extractor/njpwworld.py
index 3639d142f..89380d039 100644
--- a/yt_dlp/extractor/njpwworld.py
+++ b/yt_dlp/extractor/njpwworld.py
@@ -77,13 +77,8 @@ class NJPWWorldIE(InfoExtractor):
for kind, vid in re.findall(r'if\s+\(\s*imageQualityType\s*==\s*\'([^\']+)\'\s*\)\s*{\s*video_id\s*=\s*"(\d+)"', webpage):
player_path = '/intent?id=%s&type=url' % vid
player_url = compat_urlparse.urljoin(url, player_path)
- formats.append({
- 'url': player_url,
- 'format_id': kind,
- 'ext': 'mp4',
- 'protocol': 'm3u8',
- 'quality': 2 if kind == 'high' else 1,
- })
+ formats += self._extract_m3u8_formats(
+ player_url, video_id, 'mp4', 'm3u8_native', m3u8_id=kind, fatal=False, quality=int(kind == 'high'))
self._sort_formats(formats)