mirror of
https://github.com/ytdl-org/youtube-dl
synced 2025-02-01 16:20:10 +09:00
[atresplayer] changed auth endpoint, _API_BASE no longer needed
This commit is contained in:
parent
a4a8c926ab
commit
1a24c71595
@ -44,7 +44,6 @@ class AtresPlayerIE(InfoExtractor):
|
|||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
_API_BASE = 'https://api.atresplayer.com/'
|
|
||||||
|
|
||||||
def _real_initialize(self):
|
def _real_initialize(self):
|
||||||
self._login()
|
self._login()
|
||||||
@ -63,14 +62,13 @@ class AtresPlayerIE(InfoExtractor):
|
|||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self._download_json(
|
self._download_webpage(
|
||||||
urljoin(self._API_BASE, 'login'), None,
|
'https://account.atresplayer.com/auth/v1/login', None,
|
||||||
'Logging in', headers={
|
'Logging in', headers={
|
||||||
'Content-Type': 'application/x-www-form-urlencoded'
|
'Content-Type': 'application/x-www-form-urlencoded'
|
||||||
}, data=urlencode_postdata({
|
}, data=urlencode_postdata({
|
||||||
'username': username,
|
'username': username,
|
||||||
'password': password,
|
'password': password,
|
||||||
'type': 'credentials',
|
|
||||||
}))
|
}))
|
||||||
except ExtractorError as e:
|
except ExtractorError as e:
|
||||||
if isinstance(e.cause, compat_HTTPError) and e.cause.code == 401:
|
if isinstance(e.cause, compat_HTTPError) and e.cause.code == 401:
|
||||||
|
Loading…
Reference in New Issue
Block a user