twitter-scraper icon indicating copy to clipboard operation
twitter-scraper copied to clipboard

--exclude-retweets

Open edsu opened this issue 7 years ago • 6 comments

Is the --exclude-retweets option necessary? I don't think there's a way to include retweets when searching is there?

This is an awesome little script btw! 🍰

edsu avatar Feb 28 '18 02:02 edsu

Have you found any way to include retweets in the search result?

semmet95 avatar Mar 26 '18 05:03 semmet95

@singh-95 The search API returns retweets that match a query, but the web accessible search interface does not...at least to my knowledge.

edsu avatar Mar 26 '18 16:03 edsu

@edsu Thanks for answering. Yeah, I couldn't find any way to get retweets using search interface either. And sorry for asking another question here but is there a way to resize images from twitter posts if have the image url using url parameters?

semmet95 avatar Mar 26 '18 17:03 semmet95

Do you have the JSON for the tweet?

edsu avatar Mar 26 '18 17:03 edsu

Yes. https://pastebin.com/GXCjxH4x

This is the link to JSON object that contains tweets on the user timeline. In case of retweets the image url is stored in the ['retweeted_status'] ['extended_entities'] ['media'] [0] ['media_url'] key.

In case of tweets, the image url is stored in the ['extended_entities'] ['media'] [0] ['media_url_https'] key.

semmet95 avatar Mar 27 '18 03:03 semmet95

In case this comes up in a search one day..

Have you found any way to include retweets in the search result?

Yes, add include:nativeretweets in the search

igorbrigadir avatar Aug 09 '19 21:08 igorbrigadir