mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-26 04:32:51 +01:00
[oauth] add custom/default indicator to log messages (#501)
This commit is contained in:
parent
372ffe95ee
commit
38c05df290
@ -115,14 +115,15 @@ class OAuth1API():
|
|||||||
api_secret = extractor.config("api-secret", self.API_SECRET)
|
api_secret = extractor.config("api-secret", self.API_SECRET)
|
||||||
token = extractor.config("access-token")
|
token = extractor.config("access-token")
|
||||||
token_secret = extractor.config("access-token-secret")
|
token_secret = extractor.config("access-token-secret")
|
||||||
|
key_type = "default" if api_key == self.API_KEY else "custom"
|
||||||
|
|
||||||
if api_key and api_secret and token and token_secret:
|
if api_key and api_secret and token and token_secret:
|
||||||
self.log.debug("Using OAuth1.0 authentication")
|
self.log.debug("Using %s OAuth1.0 authentication", key_type)
|
||||||
self.session = OAuth1Session(
|
self.session = OAuth1Session(
|
||||||
api_key, api_secret, token, token_secret)
|
api_key, api_secret, token, token_secret)
|
||||||
self.api_key = None
|
self.api_key = None
|
||||||
else:
|
else:
|
||||||
self.log.debug("Using api_key authentication")
|
self.log.debug("Using %s api_key authentication", key_type)
|
||||||
self.session = extractor.session
|
self.session = extractor.session
|
||||||
self.api_key = api_key
|
self.api_key = api_key
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user