1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 02:32:33 +01:00

[deviantart] simplify 9951c112

This commit is contained in:
Mike Fährmann 2023-12-15 17:39:42 +01:00
parent 9951c112f8
commit aac8bb4eae
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -1003,10 +1003,9 @@ class DeviantartOAuthAPI():
self.strategy = extractor.config("pagination")
self.public = extractor.config("public", True)
self.client_id = extractor.config("client-id")
if self.client_id:
if not isinstance(self.client_id, str):
self.client_id = str(self.client_id)
client_id = extractor.config("client-id")
if client_id:
self.client_id = str(client_id)
self.client_secret = extractor.config("client-secret")
else:
self.client_id = self.CLIENT_ID
@ -1014,7 +1013,7 @@ class DeviantartOAuthAPI():
token = extractor.config("refresh-token")
if token is None or token == "cache":
token = "#" + str(self.client_id)
token = "#" + self.client_id
if not _refresh_token_cache(token):
token = None
self.refresh_token_key = token