-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yaml
98 lines (97 loc) · 2.68 KB
/
config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
---
# config.yaml
# this file contains xpaths and relevant config variables
# based on the configuration you choose for getting
# your results from flight_price_trends.
permitted_countries:
- de
- us
- uk
permitted_flex:
'-1': 'flexible-1day-after'
'+1': 'flexible-1day-before'
'1': 'flexible-1day'
'2': 'flexible-2days'
'3': 'flexible-3days'
permitted_journey_types:
- 'one_way'
- 'round_trip'
- 'multi_city'
- 'city_options-one_way'
- 'city_options-round_trip'
# - 'city_options-multi_city'
permitted_sort_by:
- 'price'
- 'duration_leg_*'
- 'duration_total'
- 'n_stops_leg_*'
- 'n_stops_total'
airlines_without_hand_luggage: # extend this if you encounter more airlines
# who don't allow hand luggage.
- 'JetBlue'
max_city_options: 6
country:
de:
base_url: 'https://kayak.de/flights/'
xpaths:
all_results: '//*[@id="listWrapper"]/div/div[2]/div'
result_blocks: '//*[@id="listWrapper"]/div/div[2]/div/div[*]'
us:
base_url: 'https://kayak.com/flights/'
xpaths:
all_results: '//*[@id="listWrapper"]/div/div[2]/div'
result_blocks: '//*[@id="c8C-J"]/div/div/div[*]'
uk:
base_url: 'https://kayak.co.uk/flights/'
currency_symbol: '£'
xpaths:
cookie_decline_button: '//*[@id="portal-container"]/div/div[2]/div/div/div[2]/div/div[2]/button'
all_results: '//*[@id="listWrapper"]/div/div[2]/div'
# result_blocks: '//*[@id="wNTH"]/div/div/div[*]'
# result_blocks: '//*[@id="listWrapper"]/div/div[2]/div/div[*]'
# result_blocks: '//*[@id="Qyf9"]/div/div/div[2]'
result_blocks: '/html/body/div[2]/div[1]/main/div/div[2]/div[2]/div[1]/div[2]/div[1]/div[2]/div[5]/div[2]/div/div/div/div[*]'
# show_more_button: '//*[@id="listWrapper"]/div/div[3]/div'
show_more_button: '/html/body/div[2]/div[1]/main/div/div[2]/div[2]/div[1]/div[2]/div[1]/div[3]/div[2]/div/div/div'
css_selectors:
progress_bar: "[id*='-progress-bar'][class*='progress-bar-sticky']"
result_blocks: "[class*='nrc6']"
show_more_button: "[class*='-button show-more-button']"
insert_map:
journeys:
- journey_id
- search_id
- n_legs
- cabin_baggage
- checked_baggage
- class
- airline
legs:
- leg_id
- journey_id
- leg_number
- departure_time
- arrival_time
- departure_airport
- arrival_airport
- duration
- n_stops
- stopover_airports
- distance_nominal
- distance_absolute
prices:
- journey_id
- price
- currency
- created_at
flight_searches:
- search_id
- journey_type
- origin
- destination
- leave_date
- return_date
- flex
compound_airport_codes:
- compound_code
- airport_code