try using auth tokens on scraper

This commit is contained in:
muskit
2024-03-17 23:50:17 -07:00
parent 95f654316b
commit c88ddc749a
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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
View File
@@ -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