mahrtayyab / tweety

Twitter Scraper
494 stars 67 forks source link

Unable to retrieve more tweets from user #217

Closed jczjc closed 4 days ago

jczjc commented 2 weeks ago

app is authenticated but after running the following code, I am unable to retrieve more tweets after the second iteration which only gives me about 700 tweets. Hope someone can help! Thanks!

file_count = 1 cursor = '' all_tweets = None while file_count <= 50: try: time.sleep(30) all_tweets = app.get_tweets("nicktimiraos", pages=35, wait_time=5, cursor=cursor) all_tweets.to_xlsx(f"Data/tweets/nicktimiraos/nicktimiraostest{file_count}.xlsx") file_count += 1 cursor = all_tweets.cursor print(cursor) time.sleep(930) except Exception as e: print(e)

print(cursor)

    all_tweets.to_xlsx(f"Data/tweets/nicktimiraos/nicktimiraos_error_{file_count}.xlsx")
    file_count += 1
    cursor = all_tweets.cursor
    time.sleep(930)
mahrtayyab commented 4 days ago

https://github.com/mahrtayyab/tweety/issues/128#issuecomment-1872771963