26 lines
541 B
Python
26 lines
541 B
Python
# -*- encoding: utf-8 -*-
|
|
import pandas as pd
|
|
|
|
from latecomers.parse import find_table, get_details
|
|
from latecomers.serializer import to_excel
|
|
|
|
with open("./devloop/sample3.html") as f:
|
|
content = f.read()
|
|
|
|
flights = find_table(content)
|
|
data = []
|
|
|
|
for f in flights:
|
|
data.append(get_details(f))
|
|
|
|
print(to_excel(data))
|
|
|
|
colonne = {
|
|
"th_arrival": "Arrivo teorico",
|
|
"real_arrival": "Arrivo reale",
|
|
"code": "Codice volo",
|
|
"origin": "Aeroporto di partenza",
|
|
"status": "Stato",
|
|
}
|
|
df = pd.DataFrame(data, columns=colonne)
|