I use twint for scraping data from twitter. Code as follows
import twint
import nest_asyncio
nest_asyncio.apply()
# Configure
c = twint.Config()
c.Limit = 500
c.Since = '2022-01-01'
c.Until = '2022–02–25 23:51:31.926'
c.Search = ['Anies']
c.Store_csv = True
c.Output = "tweetsAnies.csv"
twint.run.Search(c)
and an error like this appears "ValueError: time data does not match format '%Y-%m-%d %H:%M:%S'" more details in image format