Mar-25-2021, 02:44 PM
I'll try to explain my problem and how I'm trying to solve it with this code:
Basically, running this code I'm able to collect some info of aircrafts flying right now from an airline called AZU
And export this data to a TXT file, adding more two columns ([Date][Time]).
Moreover, I would like to run this code every minute, and keep upadating my TXT file.
How can I do that?
Basically, running this code I'm able to collect some info of aircrafts flying right now from an airline called AZU
from FlightRadar24.api import FlightRadar24API fr_api = FlightRadar24API() fr_api.get_flights(airline = 'AZU')And the output looks like this:
[<(A332) PR-AIW - Altitude: 25300 - Ground Speed: 429 - Heading: 328>, <(A20N) PR-YSC - Altitude: 27850 - Ground Speed: 436 - Heading: 216>, <(A20N) PR-YRV - Altitude: 12900 - Ground Speed: 370 - Heading: 251>, <(C208) PR-WOT - Altitude: 1900 - Ground Speed: 164 - Heading: 84>, <(E295) PS-AEH - Altitude: 28725 - Ground Speed: 432 - Heading: 44>, <(A20N) PR-YSF - Altitude: 6725 - Ground Speed: 282 - Heading: 32>, <(A20N) PR-YSG - Altitude: 20575 - Ground Speed: 424 - Heading: 209>, <(E195) PR-AXY - Altitude: 27000 - Ground Speed: 453 - Heading: 72>, <(E195) PR-AXB - Altitude: 17650 - Ground Speed: 345 - Heading: 210>]But I would like to run this code for more than one airline, like 'AZU', 'GLO', 'AAL', 'UAL', and so on...
And export this data to a TXT file, adding more two columns ([Date][Time]).
Moreover, I would like to run this code every minute, and keep upadating my TXT file.
How can I do that?