Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Possible to include re-tweets? #2

Open
elDudarino opened this issue Nov 5, 2018 · 19 comments
Open

Possible to include re-tweets? #2

elDudarino opened this issue Nov 5, 2018 · 19 comments
Labels
question Further information is requested

Comments

@elDudarino
Copy link

Hi there, thanks for this version - this is a very helpful tool.

I am doing a search by username bound by start and end dates and it works well. But I noticed that re-tweets are not returned, only the specific user's tweets..

Is it possible to make it so that tweets AND retweets are returned? Don't need a full release for this but if you could point me out where in the code I'd make the mods, would be super appreciated. I spent 12+ hours going through it but I didn't find a way to do it. Thanks a MILLION!

@Mottl
Copy link
Owner

Mottl commented Nov 5, 2018

Do you know a way to get all the retweets in your browser?

p.s.
Keep in mind that the total number of retweets of a tweet is already stores to csv file.

@elDudarino
Copy link
Author

elDudarino commented Nov 6, 2018

Hey there Dmitry, thanks for the reply.

Unfortunately I do not know how how to get all the retweets in the browser (can you share?), actually I am a bit confused by this question.. When I navigate to the user in question on twitter I see both the original tweets they've made and what they have re-tweeted but I am guessing this is not what you mean.

As to your second point, "Keep in mind that the total number of retweets of a tweet is already stores to csv file." - I am not really interested in seeing how many people (retweet count) retweeted the primary users tweets, rather to get the primary user's official tweets and what they have re-tweeted themselves, if that makes sense...

Any help you could offer would be extremely appreciated. Thanks Dmitry! @Mottl

@Mottl
Copy link
Owner

Mottl commented Nov 6, 2018

Unfortunately I do not know how how to get all the retweets in the browser (can you share?), actually I am a bit confused by this question..

By asking, I mean if you find a way to get those retweets in your browser then it will be possible to get them automatically with some effort in coding and parsing HTTP responses.

When I navigate to the user in question on twitter I see both the original tweets they've made and what they have re-tweeted

The problem is Twitter shows only the first 10 (or so) and this is not what you need, I assume.

@aerophile
Copy link

@elDudarino you can get tweet IDs of tweets from GetOldTweets3 which you can use with the official twitter APIs to get the retweeted tweets. See this API endpoint reference for more details

@Mottl
Copy link
Owner

Mottl commented Nov 9, 2018

@elDudarino,
you can experiment with the filter:nativeretweets and change the code accordingly.

Here is the example url:
https://twitter.com/search?f=tweets&vertical=default&q=bitcoin%20filter%3Anativeretweets&src=typd

@Mottl Mottl added the question Further information is requested label Nov 12, 2018
@caradhras36
Copy link

caradhras36 commented Feb 13, 2019

Hi there, thanks for this version - this is a very helpful tool.

I am doing a search by username bound by start and end dates and it works well. But I noticed that re-tweets are not returned, only the specific user's tweets..

Is it possible to make it so that tweets AND retweets are returned? Don't need a full release for this but if you could point me out where in the code I'd make the mods, would be super appreciated. I spent 12+ hours going through it but I didn't find a way to do it. Thanks a MILLION!

Hi @elDudarino,
Did you have any luck with this? I need the same problem.
@Mottl , thanks for this great tool. I would appreciate if you can elaborate a little bit on how to use the nativetweets parameter to get the retweeted messages.

Many thanks.

@Mottl
Copy link
Owner

Mottl commented Feb 13, 2019

how to use the nativetweets parameter

@caradhras36, just add filter:nativeretweets to the --querysearch as following:

GetOldTweets3 --querysearch "bitcoin filter:nativeretweets" --maxtweets 10

@caradhras36
Copy link

how to use the nativetweets parameter

@caradhras36, just add filter:nativeretweets to the --querysearch as following:

GetOldTweets3 --querysearch "bitcoin filter:nativeretweets" --maxtweets 10

Thank you for the super prompt reply. Let me tell you exactly what my goal is. I want to get all the tweets and retweets from a specific user. Currently, I can get all the tweets, but I can see no retweets.

So, I have two questions:

  1. I want to get the tweets and retweets from a specific user instead of a query search? How can I do this with the filter: parameter?
  2. How can I use the Python classes for the same task?

Many many thanks!

@Mottl
Copy link
Owner

Mottl commented Feb 13, 2019

I've tried get retweets from BarackObama but it didn't work as expected:
GetOldTweets3 --querysearch "filter:nativeretweets" --username "BarackObama" --maxtweets 10

Returned only 1 tweet. Weird.
You can dig further: https://help.twitter.com/en/using-twitter/advanced-tweetdeck-features

@haidaraM
Copy link

haidaraM commented Feb 16, 2019

This seem to work (only the retweets):
GetOldTweets3 --querysearch "BarackObama filter:nativeretweets" --maxtweets 10

@Mottl
Copy link
Owner

Mottl commented Feb 16, 2019

@haidaraM, it will not work: "BarackObama" in your case is not a username, but a regular text. You can verify that by checking the gathered tweets.

@haidaraM
Copy link

My bad, you are right. Didn't really pay attention to the results...

@caradhras36
Copy link

caradhras36 commented Feb 18, 2019

I've tried get retweets from BarackObama but it didn't work as expected:
GetOldTweets3 --querysearch "filter:nativeretweets" --username "BarackObama" --maxtweets 10

Returned only 1 tweet. Weird.
You can dig further: https://help.twitter.com/en/using-twitter/advanced-tweetdeck-features

@Mottl Can it happen because out of 10 tweets, only 1 was a retweet?

@caradhras36
Copy link

@Mottl, I solved my problem by using your query above and the code works fine now. Thank you very much.
I have one question though. The retweets have only the original tweet's text, not the text posted by the retweeter.
Is there a way to solve this?
Thanks.

@caradhras36
Copy link

It turns out it didn't work. It only brings the retweets from last 10 days.

@Mottl
Copy link
Owner

Mottl commented Feb 20, 2019

@caradhras36, You can experiment with Twitter search interface to find a way to get retweets.

@wsy499313317
Copy link

Hi, firstly thanks for your tool. Recently I'm doing a project that needs to collect last year's tweets about a hot news topic. Thanks for reminding me that " filter:nativeretweets " can get retweets.
But I also got one problem, it seems like that "filter:nativeretweets" cannot work if I set an old date range. Like the following:
setQuerySearch 'bitcoin filter:nativeretweets'
.setSince("2018-01-01")
.setUntil("2018-12-01")
This command cannot get any tweets. Even in advanced tweets search also cannot get any results. But when I set date limitation to the recent. It's work well.
Is "filter" function and get old tweets function cannot work simultaneously?

@giulionf
Copy link

giulionf commented Mar 5, 2019

Might be linked to #19 or #3

@gitGirl97
Copy link

I know this post is old but I still have the same problem. Is there alternative to get old retweets?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

8 participants