Skip to content

Commit

Permalink
[oauth] adjust Flickr redirect URI (fixes #503)
Browse files Browse the repository at this point in the history
Flickr now automatically forces https:// for all redirect URIs.
  • Loading branch information
mikf committed Dec 2, 2019
1 parent 0048122 commit 372ffe9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions gallery_dl/extractor/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 372ffe9

Please sign in to comment.