How can I filter using tweetpy by location and track? I use this code:
class TweetsListener(tweepy.StreamListener):
def __init__(self, api=None):
super().__init__(api)
self.listaTW=[]
def on_connect(self):
print("Estoy conectado!")
def on_status(self, status):
print(status.text)
self.listaTW.append(status.text)
def on_error(self, status_code):
print("Error", status_code)
stream = TweetsListener()
streamingApi = tweepy.Stream(auth=api.auth, listener=stream)
streamingApi.filter(
locations=[-74.8470516734,10.9924535433,-74.8452545934,10.994796901],track=["covid-19"]
)
But, It seems it is not doing the filter considering only tweets from that location.