re-implement OAuth1.0 code
OAuth support for SmugMug needs some additional features (auth-rebuild on redirect, query parameters in URL, ...) and fixing this in the old code wouldn't work all that well.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
"""Extract images from https://www.smugmug.com/"""
|
||||
|
||||
from .common import Extractor, Message
|
||||
from .. import text, util, exception
|
||||
from .. import text, oauth, exception
|
||||
|
||||
BASE_PATTERN = (
|
||||
r"(?:smugmug:(?!album:)(?:https?://)?([^/]+)|"
|
||||
@@ -186,8 +186,7 @@ class SmugmugAPI():
|
||||
token_secret = extractor.config("access-token-secret")
|
||||
|
||||
if api_key and api_secret and token and token_secret:
|
||||
self.session = util.OAuthSession(
|
||||
extractor.session,
|
||||
self.session = oauth.OAuth1Session(
|
||||
api_key, api_secret,
|
||||
token, token_secret,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user