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

get_tweet_by_id() throws IndexError #93

Open
victoria-n-w opened this issue May 8, 2024 · 0 comments
Open

get_tweet_by_id() throws IndexError #93

victoria-n-w opened this issue May 8, 2024 · 0 comments

Comments

@victoria-n-w
Copy link

victoria-n-w commented May 8, 2024

  File "/home/victoria/projects/get_tweets.py, line 29, in get_tweet
    tweet = client.get_tweet_by_id(tweet_id)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/victoria/projects/venv/lib64/python3.11/site-packages/twikit/client.py", line 1398, in get_tweet_by_id
    entries = find_dict(response, 'entries')[0]
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

here's how I create the client:

client = Client("en-US")

client.load_cookies("cookies.json")

I"m trying to get a tweet with id 284705391957401601

it's possible that the tweet I'm trying to get was deleted maybe - in that case maybe a different error would be better than IndexError?

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