diff options
| author | 2019-12-25 19:40:28 -0500 | |
|---|---|---|
| committer | 2019-12-25 19:40:28 -0500 | |
| commit | f9a1a9dcb7df977eeac9544786df9c0b93795815 (patch) | |
| tree | 8cb69cf7685da8d7e4deb7dc1d6b209098e1ddfb /gallery_dl/extractor/oauth.py | |
| parent | 0c73e982fa596da07f23b377621ab894a9e64884 (diff) | |
New upstream version 1.12.1upstream/1.12.1
Diffstat (limited to 'gallery_dl/extractor/oauth.py')
| -rw-r--r-- | gallery_dl/extractor/oauth.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gallery_dl/extractor/oauth.py b/gallery_dl/extractor/oauth.py index 912447b..74835bf 100644 --- a/gallery_dl/extractor/oauth.py +++ b/gallery_dl/extractor/oauth.py @@ -15,11 +15,14 @@ from ..cache import cache import os import urllib.parse +REDIRECT_URI_LOCALHOST = "http://localhost:6414/" +REDIRECT_URI_HTTPS = "https://mikf.github.io/gallery-dl/oauth-redirect.html" + class OAuthBase(Extractor): """Base class for OAuth Helpers""" category = "oauth" - redirect_uri = "http://localhost:6414/" + redirect_uri = REDIRECT_URI_LOCALHOST def __init__(self, match): Extractor.__init__(self, match) @@ -27,7 +30,7 @@ class OAuthBase(Extractor): def oauth_config(self, key, default=None): return config.interpolate( - ("extractor", self.subcategory, key), default) + ("extractor", self.subcategory), key, default) def recv(self): """Open local HTTP server and recv callback parameters""" @@ -163,7 +166,7 @@ class OAuthBase(Extractor): class OAuthDeviantart(OAuthBase): subcategory = "deviantart" pattern = "oauth:deviantart$" - redirect_uri = "https://mikf.github.io/gallery-dl/oauth-redirect.html" + redirect_uri = REDIRECT_URI_HTTPS def items(self): yield Message.Version, 1 @@ -182,6 +185,7 @@ class OAuthDeviantart(OAuthBase): class OAuthFlickr(OAuthBase): subcategory = "flickr" pattern = "oauth:flickr$" + redirect_uri = REDIRECT_URI_HTTPS def __init__(self, match): OAuthBase.__init__(self, match) |
