mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-23 19:55:38 +01:00
dplay: dont crash when we have wrong cookie
This commit is contained in:
parent
47aeb1b907
commit
53eddea15e
@ -173,6 +173,8 @@ class Dplay(Service):
|
||||
|
||||
def _login(self):
|
||||
res = self.http.get("https://disco-api.{}/users/me".format(self.domain), headers={"authority": "disco-api.{}".format(self.domain)})
|
||||
if res.status_code >= 400:
|
||||
return False
|
||||
if not res.json()["data"]["attributes"]["anonymous"]:
|
||||
return True
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user