latecomers/devloop/parse_retrieve.py
2024-05-06 01:10:43 +02:00

19 lines
496 B
Python

# -*- encoding: utf-8 -*-
import os
from latecomers.retrieve import retrieve_from_inst, retrieve_from_fr24
from latecomers.parse import count_pages, find_table, get_details, parse_fr24
breakpoint()
aux_data = parse_fr24(retrieve_from_fr24())
body = retrieve_from_inst()
pages = count_pages(body)
flights = find_table(body)
for page in range(2, pages + 1):
body = retrieve_from_inst(page)
flights.extend(find_table(body))
for f in flights:
print(get_details(f, aux_data=aux_data))