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
|
2024-05-06 01:10:43 +02:00
|
|
|
from latecomers.parse import count_pages, find_table, get_details, parse_fr24
|
2022-08-21 08:37:45 +02:00
|
|
|
|
2024-05-06 01:10:43 +02:00
|
|
|
breakpoint()
|
|
|
|
aux_data = parse_fr24(retrieve_from_fr24())
|
2022-08-21 08:37:45 +02:00
|
|
|
|
2024-05-06 01:10:43 +02:00
|
|
|
body = retrieve_from_inst()
|
|
|
|
pages = count_pages(body)
|
2022-08-21 08:37:45 +02:00
|
|
|
flights = find_table(body)
|
2024-05-06 01:10:43 +02:00
|
|
|
for page in range(2, pages + 1):
|
|
|
|
body = retrieve_from_inst(page)
|
|
|
|
flights.extend(find_table(body))
|
2022-08-21 08:37:45 +02:00
|
|
|
|
|
|
|
for f in flights:
|
2024-05-06 01:10:43 +02:00
|
|
|
print(get_details(f, aux_data=aux_data))
|