dimanche 6 septembre 2020

How to get proper result from web scraping (about flight information in Kayak)?

from bs4 import BeautifulSoup 
import requests 
url = 'https://www.kayak.co.uk/flights/SEL-LON/2020-12-31?sort=bestflight_a'
r = requests.get(url)
soup = BeautifulSoup(r.text, 'html.parser')
deptimes = soup.find_all('span', attrs={'class': 'depart-time base-time'})
deptimes

In Kayak, I have tried to get departure time information of flights from Seoul to London. The result is [], and I'm trying this format to other information but the results are same always. Thank you




Aucun commentaire:

Enregistrer un commentaire