1
import twint 
import nest_asyncio
import pandas as pd


nest_asyncio.apply()

c = twint.Config()
c.Search = "Covid-19"
twint.run.Search(c)

The above code collects tweets that have the word covid-19 but I want the tweets only from last year and a specific location?

Yoshith Kotla
  • 135
  • 1
  • 3
  • 13

2 Answers2

1

You can add a time range in the search string as follows:

searchstr = "(Covid-19) until:2021-02-19 since:2021-02-17)"
c.Search = searchstr

Source

elyptikus
  • 936
  • 8
  • 24
0

To specify a location, you may add to your search string

geocode:latitude,longitude,radius

For example:

geocode:43.913723261972855,-72.54272478125,150km

https://thoughtfaucet.com/search-twitter-by-location/examples/