adapt scraping code to mainline library version

This commit is contained in:
muskit
2024-02-08 14:33:16 -08:00
parent 6d61814f00
commit f038233125
3 changed files with 22 additions and 20 deletions
+2 -2
View File
@@ -19,7 +19,7 @@ class Scraper:
def __init__(self):
Scraper.instance = self
self.__account = AccountPool()
self.try_login()
self.try_login(0)
def try_login(self, account_idx: int = None) -> bool:
# decide on which account to use
@@ -159,7 +159,7 @@ class Scraper:
search = self.app.search(
f"from:{username}", filter_=SearchFilters.Latest(), cursor=cur
)
cur_page = search.tweets
cur_page = search.results
print(f"obtained {len(cur_page)} tweets")
if len(cur_page) == 0: