aboutsummaryrefslogtreecommitdiffstats
path: root/hypervideo_dl/extractor/njpwworld.py
diff options
context:
space:
mode:
Diffstat (limited to 'hypervideo_dl/extractor/njpwworld.py')
-rw-r--r--hypervideo_dl/extractor/njpwworld.py19
1 files changed, 3 insertions, 16 deletions
diff --git a/hypervideo_dl/extractor/njpwworld.py b/hypervideo_dl/extractor/njpwworld.py
index 3639d14..68c8c8e 100644
--- a/hypervideo_dl/extractor/njpwworld.py
+++ b/hypervideo_dl/extractor/njpwworld.py
@@ -43,15 +43,7 @@ class NJPWWorldIE(InfoExtractor):
_LOGIN_URL = 'https://front.njpwworld.com/auth/login'
- def _real_initialize(self):
- self._login()
-
- def _login(self):
- username, password = self._get_login_info()
- # No authentication to be performed
- if not username:
- return True
-
+ def _perform_login(self, username, password):
# Setup session (will set necessary cookies)
self._request_webpage(
'https://njpwworld.com/', None, note='Setting up session')
@@ -77,13 +69,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)