[deviantart] add support for OAuth2 authentication

Some user galleries [*] require you to be either logged in or
authenticated via OAuth2 to access their deviations.

[*] e.g. https://polinaegorussia.deviantart.com/gallery/

--------------

known issue:
A deviantart 'refresh_token' can only be used once and gets updated
whenever it is used to request a new 'access_token', so storing its
initial value in a config file and reusing it again and again is not
possible.
This commit is contained in:
Mike Fährmann
2017-12-18 00:12:08 +01:00
parent 91c2aed077
commit fc7d165c97
9 changed files with 119 additions and 63 deletions

View File

@@ -76,14 +76,15 @@ SUBCATEGORY_MAP = {
}
AUTH_MAP = {
"batoto" : "Optional",
"exhentai": "Optional",
"flickr" : "Optional (OAuth)",
"nijie" : "Required",
"pixiv" : "Required",
"reddit" : "Optional (OAuth)",
"sankaku" : "Optional",
"seiga" : "Required",
"batoto" : "Optional",
"deviantart": "Optional (OAuth)",
"exhentai" : "Optional",
"flickr" : "Optional (OAuth)",
"nijie" : "Required",
"pixiv" : "Required",
"reddit" : "Optional (OAuth)",
"sankaku" : "Optional",
"seiga" : "Required",
}
IGNORE_LIST = (