From 372ffe95eec44c85bd3e0edbdc8a4bda47fa6cab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Mon, 2 Dec 2019 18:05:36 +0100 Subject: [PATCH] [oauth] adjust Flickr redirect URI (fixes #503) Flickr now automatically forces https:// for all redirect URIs. --- gallery_dl/extractor/oauth.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gallery_dl/extractor/oauth.py b/gallery_dl/extractor/oauth.py index ef86d2544c..74835bfe4e 100644 --- a/gallery_dl/extractor/oauth.py +++ b/gallery_dl/extractor/oauth.py @@ -15,11 +15,14 @@ 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) @@ -163,7 +166,7 @@ def _oauth2_authorization_code_grant( 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 @@ def items(self): class OAuthFlickr(OAuthBase): subcategory = "flickr" pattern = "oauth:flickr$" + redirect_uri = REDIRECT_URI_HTTPS def __init__(self, match): OAuthBase.__init__(self, match)