-
Notifications
You must be signed in to change notification settings - Fork 29
Closed
Description
Hi! And HUGE thanks for your work! I got a small problem. I cant get earlier data from Departures or Arrivals. I'm doing something wrong or it is a bug?
[IN]
from pyflightdata import FlightData
f=FlightData()
f.get_airport_departures('RIX', page=1, limit=100, earlier_data = True)
I got error
[OUT]
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-39-12e1b6d25705> in <module>
1 from pyflightdata import FlightData
2 f=FlightData()
----> 3 f.get_airport_departures('RIX', page=1, limit=100, earlier_data = True)
~\Anaconda3\lib\site-packages\pyflightdata\flightdata.py in get_airport_departures(self, iata, page, limit, earlier_data)
496 """
497 if earlier_data:
--> 498 url = AIRPORT_DATA_BASE_EARLIER.format(iata, str(self.AUTH_TOKEN), page, limit,int(datetime.date.today().strftime('%s')))
499 else:
500 url = AIRPORT_DATA_BASE.format(iata, str(self.AUTH_TOKEN), page, limit)
ValueError: Invalid format string
,,False,, is working!
[IN]
from pyflightdata import FlightData
f=FlightData()
f.get_airport_departures('RIX', page=1, limit=100, earlier_data = False)
[OUT]
[{'flight': {'identification': {'number': {'default': 'BT428',
'alternative': 'None'},
'callsign': 'None'},
'status': {'live': False,
'text': 'Estimated dep 12:45',
'estimated': 'None',
'ambiguous': False,
'generic': {'status': {'text': 'estimated',
'type': 'departure',
'color': 'green',
'diverted': 'None'},
'eventTime': {'utc_millis': 1577270700000,
Metadata
Metadata
Assignees
Labels
No labels