latecomers/devloop/parse_retrieve.py

16 lines
395 B
Python
Raw Permalink Normal View History

2022-08-21 08:37:45 +02:00
# -*- encoding: utf-8 -*-
import os
2022-09-07 23:44:53 +02:00
from latecomers.retrieve import retrieve_from_inst, retrieve_from_fr24
from latecomers.parse import find_table, get_details, parse_fr24
2022-08-21 08:37:45 +02:00
2022-09-07 23:44:53 +02:00
body = retrieve_from_inst()
2022-08-21 08:37:45 +02:00
flights = find_table(body)
2022-09-07 23:44:53 +02:00
aux_data = parse_fr24(retrieve_from_fr24())
breakpoint()
2022-08-21 08:37:45 +02:00
for f in flights:
2022-09-07 23:44:53 +02:00
print(get_details(f, aux_data=aux_data, debug=os.environ.get("DEBUG") is not None))