Fix: adjust timestamp for fr24 data retrieval

This commit is contained in:
sfigato 2022-09-09 11:09:03 +02:00
parent 7e7d1fff1e
commit e6825248dd
Signed by: blallo
GPG Key ID: 0CBE577C9B72DC3F

View File

@ -27,7 +27,7 @@ def remote_fr24() -> T.Text:
"""
Returns the url to retrieve data from flightradar24.
"""
yesterday_ts = int((datetime.now() - timedelta(days=1)).timestamp())
yesterday_ts = int((datetime.now() - timedelta(hours=12)).timestamp())
url = f"https://api.flightradar24.com/common/v1/airport.json?code=cia&plugin[]=&plugin-setting[schedule][mode]=arrivals&plugin-setting[schedule][timestamp]={yesterday_ts}&page=-1&limit=100&fleet=&token=" # noqa: E501
return url