Closed xeliot closed 4 years ago
Thanks for your contribution @xeliot . We have an issue which pointing this problem (#101 ). But its appearing if you try getting tweets from hashtaghs. Is it same thing? Could you explain your problem? Its better if you fill the description :/
PS: I saw your comment on issue now. Just bad space to write description, lol. I saw your PR before your comment which one writed on the issue. my bad...
Any updates on merging this?
Thanks for update @iamMehedi . Just merging this awesome contribution :). I'll push to PyPI as soon as possible.
Fixes issue (#101)
Brief summary of how I fixed it by modifying
tweets.py
:Change
r = session.get(url, headers=headers)
tor = session.get(url+'&max_position', headers=headers)
. This allows response json to returnmin_position
parameter which will then be used as themax_position
parameter in the nextsession.get
r_json = r.json()
Change
r = session.get(url, params={'max_position': last_tweet}, headers=headers)
tor = session.get(url, params={'max_position': r_json['min_position']}, headers=headers)
.This gets rid of twitter pages repeating on search query.