lschmelzeisen/nasty

python api 'search until' goes into a loop in some cases and repeatedly returns the same tweet

Opened this issue · 0 comments

i'm using the python API to 'search until' e.g.

tweet_stream = nasty.Search("trump",
                           until=datetime(2018,5,2),
                           lang="en").request()
for tweet in tweet_stream:
    print(tweet.created_at, tweet.text)

with some datetimes it seems to go into a loop where, instead of returning a batch of 20 new tweets, it repeatedly returns the same tweet.

i have also reproduced the same basic problem with the following search/datetime combinations:
"climate", until=datetime(2016,5,2),
"climate", until=datetime(2019,5,2),

in the latter case, it's the final 3 tweets which get repeated in the output.

i attach 3 txt files:
test_output_until_2018-5-2_trump.txt | search = trump, datetime = 18-5-2, results = OK
test_output_until_2017-5-2_trump.txt | search = trump. datetime = 17-5-2, results = repeating tweet
test_output_until_2019-5-2_climate.txt | search = climate, datetime = 19-5-2, results = repeating final 3 tweets

test_output_until_2018-5-2_trump.txt
test_output_until_2017-5-2_trump.txt
test_output_until_2019-5-2_climate.txt