1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-26 04:02:11 +00:00

[njpwworld] Fix authentication (closes #15815)

This commit is contained in:
Sergey M․ 2018-03-10 22:35:47 +07:00
parent 3a0ceb32e2
commit cc7f6c720e
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D

View file

@ -43,7 +43,8 @@ class NJPWWorldIE(InfoExtractor):
webpage, urlh = self._download_webpage_handle( webpage, urlh = self._download_webpage_handle(
'https://njpwworld.com/auth/login', None, 'https://njpwworld.com/auth/login', None,
note='Logging in', errnote='Unable to login', note='Logging in', errnote='Unable to login',
data=urlencode_postdata({'login_id': username, 'pw': password})) data=urlencode_postdata({'login_id': username, 'pw': password}),
headers={'Referer': 'https://njpwworld.com/auth'})
# /auth/login will return 302 for successful logins # /auth/login will return 302 for successful logins
if urlh.geturl() == 'https://njpwworld.com/auth/login': if urlh.geturl() == 'https://njpwworld.com/auth/login':
self.report_warning('unable to login') self.report_warning('unable to login')