Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to retrieve more tweets from user #217

Open
jczjc opened this issue Nov 9, 2024 · 0 comments
Open

Unable to retrieve more tweets from user #217

jczjc opened this issue Nov 9, 2024 · 0 comments

Comments

@jczjc
Copy link

jczjc commented Nov 9, 2024

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/nicktimiraos_test_{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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant