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

Question on replies to tweets #219

Open
gavenisaweesome opened this issue Sep 19, 2024 · 1 comment
Open

Question on replies to tweets #219

gavenisaweesome opened this issue Sep 19, 2024 · 1 comment

Comments

@gavenisaweesome
Copy link

According to my knowledge twikit only gets posts the user has written, and not replies.

Is there any way to retrieve user replies using twikit?

@deepak-coding-art
Copy link

deepak-coding-art commented Sep 29, 2024

I was also looking into this. I found that it does not give the replies if you are using the GuestClient() but it does give you replies if you use the client with credentials

client = Client('en-US')

await client.login(
        auth_info_1=USERNAME ,
        auth_info_2=EMAIL,
        password=PASSWORD
    )

tweet = await client.get_tweet_by_id(TWITTER_POST_ID)
replies = tweet.replies

for reply in replies:
    print(reply.text)

this will not include all replies in it so if you want more you need to go to next

more_replies = await replies.next()
for reply in more_replies:
    print(reply.text)

According to my knowledge twikit only gets posts the user has written, and not replies.

Is there any way to retrieve user replies using twikit?

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

2 participants