latecomers/latecomers/retrieve.py

15 lines
1.1 KiB
Python

# -*- encoding: utf-8 -*-
import typing as T
import requests
HOW_MANY = 200
URL = f"https://www.adr.it/pax-cia-voli-in-tempo-reale?p_p_id=3_WAR_realtimeflightsportlet&p_p_lifecycle=0&p_p_state=normal&p_p_mode=view&_3_WAR_realtimeflightsportlet_tab=arrival&_3_WAR_realtimeflightsportlet_delta={HOW_MANY}&_3_WAR_realtimeflightsportlet_airport=&_3_WAR_realtimeflightsportlet_carrier=&_3_WAR_realtimeflightsportlet_codNat=&_3_WAR_realtimeflightsportlet_codScaOpe=&_3_WAR_realtimeflightsportlet_codVet=&_3_WAR_realtimeflightsportlet_date=&_3_WAR_realtimeflightsportlet_dataNumVol=&_3_WAR_realtimeflightsportlet_numVol=&_3_WAR_realtimeflightsportlet_rouIata=&_3_WAR_realtimeflightsportlet_orario=&_3_WAR_realtimeflightsportlet_searchType=completeSmall&_3_WAR_realtimeflightsportlet_orderByCol=comparationTime&_3_WAR_realtimeflightsportlet_orderByType=asc&_3_WAR_realtimeflightsportlet_resetCur=false&_3_WAR_realtimeflightsportlet_cur=1" # noqa: E501
def retrieve() -> T.Text:
"""This function retrieves the body from the website page"""
r = requests.get(URL)
return r.text