kurtawirth / botscan

R tool for scanning Twitter for bot activity on a conversation level.
GNU General Public License v3.0
10 stars 6 forks source link

Create argument to allow for specific n tweets #26

Closed kurtawirth closed 5 years ago

kurtawirth commented 5 years ago

Argument should stream until n reaches a given number.

ryantmoore commented 5 years ago

Suppose the user sets timeout = 30. Is the idea to interrupt the stream after 20 seconds if, say, 1000 tweets have already been pulled? If so, might it make sense to reuse the n_tweets argument (doing different things with it, depending on the API being used)?

kurtawirth commented 5 years ago

Correct! Agreed on both fronts.

ryantmoore commented 5 years ago

The only argument to rtweet::stream_tweets() that might enable this appears to be ..., which allows other unspecified parameters to be added to the URL for the query. The only Twitter API parameter that might facilitate this appears to be count. It appears (from digging into rtweet:::.search_tweets) that, in fact, this is the parameter that make_url() is using. However, it's not clear to me whether we have "elevated access". We should try adding an argument count = n_tweets to stream_tweets() in botscan() line 62, and see if this is possible for us, or might be for users with "elevated access".

For a description of count, see https://developer.twitter.com/en/docs/tweets/filter-realtime/guides/basic-stream-parameters.html

kurtawirth commented 5 years ago

Have confirmed that count = will not work due to a lack of "elevated access". Also unsure as to whether this function would achieve what we hope to achieve here.

ryantmoore commented 5 years ago

Without access to the count parameter, I propose we table and close this idea.

kurtawirth commented 5 years ago

Agreed.