I'm working with Twint(a Twitter scraper) but somehow there is a problem that I can't fix. I wonder if there is a way that when an error occurs, wait 1 min and re-execute this? My code is like this:
import twint
geos = ["40.74566208501717, -73.99137569478954", "35.68802408270403, 139.76489869554837", "31.22521968438549, 121.51655148017774"]
for geo in geos:
print(str(geo)+','+'10km')
c = twint.Config()
c.Limit = 20
c.Geo = str(geo)+','+'10km'
twint.run.Search(c)
Sometimes,twint.run.Search(c)
can't function correctly.So, once there is an error, is there a way to only execute this loop again but not re-executing the whole loop?
Would anyone help me? Any idea would be really helpful. Thank you much!