JeanExtreme002 / FlightRadarAPI

:airplane: Unofficial SDK for FlightRadar24 for Python 3 and NodeJS
https://pypi.org/project/FlightRadarAPI/
MIT License
296 stars 60 forks source link

Adding timeout to requests #79

Closed GregoirePelegrin closed 3 months ago

GregoirePelegrin commented 3 months ago

Is your feature request related to a problem? Please describe.

EugIva commented 3 months ago

smth like this?

timing = time.time()
       ###
except requests.exceptions.ConnectionError or TimeoutError or requests.exceptions.ConnectTimeout \
               or AttributeError:
            self.out_filename = "1" + self.out_filename
            if timing < self.finish and len(self.out_filename) < 20:
                print("Connection error " + str(datetime.now()) + ". reconnectng...")
JeanExtreme002 commented 3 months ago

Solved on PR #80