Closed shizia closed 3 years ago
I'm afraid that's just how Twitter's search works. Specifically, a search term matches on the username, the display name, the tweet text, and URLs, as far as I know. I'm not aware of a way to filter those other matches out directly; you'd have to do something like this instead for your case:
if 'covid19' not in tweet.content.lower():
continue
I'm afraid that's just how Twitter's search works. Specifically, a search term matches on the username, the display name, the tweet text, and URLs, as far as I know. I'm not aware of a way to filter those other matches out directly; you'd have to do something like this instead for your case:
if 'covid19' not in tweet.content.lower(): continue
I see, thank you very much!!
Hello! I encounter a problem. I use
for i, tweet in enumerate(snscrape.modules.twitter.TwitterSearchScraper("COVID19 since:2020-02-01 until:2020-02-02").get_items()):
, but the result is strange, the tweets didn't include COVID19, instead, all usernames include COVID19. But I want to scrape tweets which include COVID19 , not username. How to slove this problem?