-
Notifications
You must be signed in to change notification settings - Fork 84
Open
Labels
bugSomething isn't workingSomething isn't working
Description
When parsing and appending flights to our results array, the same flight can be added multiple times:
The only difference between one line and the other is the is_best property—does anyone know if it actually makes a difference?
My suggestion is to remove one of the lines:
flights = []
seen_keys = set()
for i, fl in enumerate(parser.css('div[jsname="IWWDBc"], div[jsname="YdtKid"]')):
flightkey = (name, departure_time, arrival_time, duration, stops_fmt, delay, price)
if flightkey in seen_keys :
continue
flights_seen.add(flightkey)
flights.append({ … })
dosubot
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
