浏览代码

[njpwworld] Fix authentication (closes #15815)

Sergey M․ 7 年之前
父节点
当前提交
cc7f6c720e
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      youtube_dl/extractor/njpwworld.py

+ 2 - 1
youtube_dl/extractor/njpwworld.py

@@ -43,7 +43,8 @@ class NJPWWorldIE(InfoExtractor):
         webpage, urlh = self._download_webpage_handle(
             'https://njpwworld.com/auth/login', None,
             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
         if urlh.geturl() == 'https://njpwworld.com/auth/login':
             self.report_warning('unable to login')