vladkens / twscrape

2024! X / Twitter API scrapper with authorization support. Allows you to scrape search results, User's profiles (followers/following), Tweets (favoriters/retweeters) and more.
https://pypi.org/project/twscrape/
MIT License
793 stars 104 forks source link

Extracting Tweets with replies #104

Closed TharushaIQZ closed 2 months ago

TharushaIQZ commented 6 months ago

Existing user_tweets_and_replies function extracts tweets and replies posted by a particular given user. However I want to extract all the replies of a particular tweet in my twitter profile. Is it possible using twscrape?

vladkens commented 5 months ago

Hi, @TharushaIQZ. This cannot be done in twscrape directly via a special handler, but can be done via search:

async for tw in api.search("conversation_id:1637235385070678017 filter:replies"):
    print(tw)

or with CLI

twscrape search "conversation_id:1637235385070678017 filter:replies"

conversation_id is your tweet id. Not sure that filter:replies required.

Note for me: twitter can load replies directly by TweetDetail operation with pagination (example)

fernandoamorim30 commented 5 months ago

@TharushaIQZ, you was resolved your question? Im have a similar issue.... Im need get all replies from one tweet id in CSV or JSON or whatever....

heyeanne34 commented 4 months ago

hello owner has this been added? pls add huhuhu , i want to get all comments and their nested replies in a tweet.. also do u have discord or any socmed where i can recommend more suggestions?

vladkens commented 2 months ago

Should be added in v0.11. If something wrong open new issue please.

heyeanne34 commented 2 months ago

Should be added in v0.11. If something wrong open new issue please.

can u pls teach to use huhuh