try using auth tokens on scraper
This commit is contained in:
+2
-2
@@ -11,9 +11,9 @@ class AccountPool:
|
||||
creds = dotenv_values(working_path(file=".env"))
|
||||
i = 0
|
||||
while True:
|
||||
if f"scraper_username{i}" in creds and f"scraper_password{i}" in creds:
|
||||
if f"scraper_username_{i}" in creds and f"scraper_auth_token_{i}" in creds:
|
||||
self.__accounts.append(
|
||||
(creds[f"scraper_username{i}"], creds[f"scraper_password{i}"])
|
||||
(creds[f"scraper_username_{i}"], creds[f"scraper_auth_token_{i}"])
|
||||
)
|
||||
i += 1
|
||||
else:
|
||||
|
||||
+2
-2
@@ -37,9 +37,9 @@ class Scraper:
|
||||
try:
|
||||
self.app.connect()
|
||||
except:
|
||||
self.app.sign_in(*acc)
|
||||
self.app.load_auth_token(acc[1])
|
||||
else:
|
||||
self.app.sign_in(*acc)
|
||||
self.app.load_auth_token(acc[1])
|
||||
return True
|
||||
print("exhausted all accounts!")
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user