use custom HTTPBasicAuth class
to support LazyPrompt as password and to generate the Authorization header only once instead of for every request
This commit is contained in:
@@ -423,9 +423,10 @@ class RedditAPI():
|
||||
"grants/installed_client"),
|
||||
"device_id": "DO_NOT_TRACK_THIS_DEVICE"}
|
||||
|
||||
auth = util.HTTPBasicAuth(self.client_id, "")
|
||||
response = self.extractor.request(
|
||||
url, method="POST", headers=self.headers,
|
||||
data=data, auth=(self.client_id, ""), fatal=False)
|
||||
data=data, auth=auth, fatal=False)
|
||||
data = response.json()
|
||||
|
||||
if response.status_code != 200:
|
||||
|
||||
Reference in New Issue
Block a user