From f4d15edc50b999dd338d2af0eeea7dcf3ce0e457 Mon Sep 17 00:00:00 2001 From: Harmon Date: Fri, 7 Jan 2022 05:36:55 -0600 Subject: [PATCH] Simplify OAuthHandler --- tweepy/auth.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tweepy/auth.py b/tweepy/auth.py index c6b798e..d2c8726 100644 --- a/tweepy/auth.py +++ b/tweepy/auth.py @@ -29,9 +29,6 @@ class AuthHandler: class OAuthHandler(AuthHandler): - """OAuth authentication handler""" - OAUTH_HOST = 'api.twitter.com' - OAUTH_ROOT = '/oauth/' def __init__(self, consumer_key, consumer_secret, callback=None): if not isinstance(consumer_key, (str, bytes)): @@ -53,7 +50,7 @@ class OAuthHandler(AuthHandler): callback_uri=self.callback) def _get_oauth_url(self, endpoint): - return 'https://' + self.OAUTH_HOST + self.OAUTH_ROOT + endpoint + return 'https://api.twitter.com/oauth/' + endpoint def apply_auth(self): return OAuth1(self.consumer_key, -- 2.25.1