SHARE
TWEET

Untitled

a guest Aug 19th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def status_flight_gdansk ():
  2.     url1 = "https://www.airport.gdansk.pl/loty/tablica-odlotow-p2.html"
  3.     headers = {'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36'}
  4.     response = requests.get(url1, headers=headers)
  5.     soup = BeautifulSoup(response.content, 'html.parser')
  6.     table = soup.find_all('div',{'class':'table__element','class':'table__airport',})
  7.     table1 = soup.find_all('div',{'class':'table__element','class':'table__flight'})
  8.     for i in range(len(table)):
  9.         print(str(table[i]))
  10.         print(type(table[i]))
  11.     for i in range(len(table1[i])):
  12.         print(str(table1))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top