-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathswatcher.ini
More file actions
205 lines (177 loc) · 7.14 KB
/
swatcher.ini
File metadata and controls
205 lines (177 loc) · 7.14 KB
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
#
# This file is used to specify parameters to control swatcher. By default, swatcher.py will
# attempt to open "swatcher.ini" if no other configuration file is specified via
# the command line.
#
# This file is broken down into two or more sections. The first section is [global] which
# is used to specify parameters global in scope. In addition to the [global] section
# you can have one OR MORE sections with the format [trip-X] where X is an integer value.
# The integers do not need to be sequential or similar, they are just used to uniquely
# identify each section. These sections will contain parameters specific to each "trip" you
# are looking to take. Supporting multiple sections here allows to monitor multiple days
# for a single trip or scanning for different trips
#
[global]
#
# pollInterval (OPTIONAL) is frequency (in minutes) that prices are checked. If this value is lower
# than 10, then the program will ignore the value specified and default to 30 minutes.
# the purpose for doing this is to not query prices so frequently that actions are
# taken to stop scraping
#
pollInterval = 60
#
# notificationMethod (REQUIRED) specifies how alerts are sent out. Currently "smtp" and "twilio"
# are supported. For each supported notificationMethod, there should be a corresponding section
# (eg: [smtp] for configuration
#
notificationMethod = smtp
#
# browser (REQUIRED) specifes the underlying web browser to perform the scraping. Unlike the prior
# SWA flight search that was static and could use BeautifulSoup to scrape, the April 2018 revision
# went dynamic, requiring us to use Selenium. When using Selenium you must specify an underyling
# browser to perform the scraping. Currently the only supported option I've tested is 'chrome'
# so any other options will be rejected
#
# Each browser will have it's on configuration section with the equivalent name for specific
# configuration
#
browser = firefox
#
# historyFileBase (OPTIONAL) is set to specify a base filename to store trip price history in,
# allowing history for SMTP notifications to survive swatcher restarts. If this is not set,
# history will only commence from process start
#
# historyFileBase = fall2018
#
# dailyAlerts (OPTIONAL) this value defaults to False, it triggers swatcher to send out an
# alert every day per trip after the first query post midnight that will say what the
# current lowest price state is. This provides a rough way to determine is swatcher
# is still running, in the case that the fares being monitored aren't changing frequently
#
# dailyAlerts = False
[smtp]
#
# host (REQUIRED) specifies the IP address or hostname of the SMTP server to connect to. This key is
# required if using SMTP notification
#
host = 192.168.100.4
#
# port (OPTIONAL) is used to change the default SMTP server port. By default this is 25, but if your
# server using something non-standard, specify it here
#
#port = 2525
#
# recipient (REQUIRED) contains the recipient(s) to send email to. For multiple recipients, email
# addresses should be comma delimited
#
recipient = user123@gmail.com
#
# sender (REQUIRED) is the email address to use as the the email sender
#
sender = swatcher@farewatcher.com
#
# username and password are required if your SMTP server requires authentication,
# otherwise these two keys are optional.
#
# Remember that the password is in cleartext, so precautions should be taken to ensure
# having a password in this file doesn't cause any security issues
#
#username = guest
#password = B0z0TheClown4!
#
[twilio]
#
# accountSid and authToken (REQUIRED) are used by the Twilio library to authenticate your account
#
accountSid = ACabababababababababababababababab
authToken = 01234567890abcdef01234567890abcd
#
# sender and recipient (REQUIRED) are used for source and destination SMS
#
sender = +3121234567
recipient = +3129876543
[chrome]
#
# binaryLocation (REQUIRED) if using chrome. This is the path the binary for the Selenium WebDriver
# to use.
#
binaryLocation = /usr/bin/google-chrome
[firefox]
#
# binaryLocation (REQUIRED) if using firefox. This is the path the binary for the Selenium WebDriver
# to use.
#
binaryLocation = /opt/firefox/firefox
[trip-1]
#
# description (OPTIONAL) is used included in all alerts sent to provide additional details.
#
description = Fall Vacation
#
# originationAirportCode (REQUIRED) is used to specify the 3 letter IATA code for the origination airport
# examples are MDW (Midway), MCO (Orlando), LGA (Laguardia)
#
originationAirportCode = MDW
#
# destinationAirportCode (REQUIRED) is used to specify the 3 letter IATA code for the destination airport
#
destinationAirportCode = DEN
#
# type (REQUIRED) is used to specify if round trip or one way. Supported values for this field are
# "roundtrip" or "oneway". If "oneway is specifed, the key returnDate is OPTIONAL
#
type = roundtrip
#
# departureDate (REQUIRED) specifies the departue date. Format of this value is YYYY-MM-DD
#
departureDate = 2018-10-07
#
# departureTimeOfDay (OPTIONAL) allows you to select the time of day for departure. If unspecified,
# the search will be "anytime". Other choices are "morning" (before noon in the departue time zone),
# "afternoon" for between noon and 6PM, and "evening" for between 6PM and midnight
#
#departureTimeOfDay = morning
#
# returnDate (REQUIRED if roundtrip, otherwise ignored). Specifies the return date. Format of this value
# is YYYY-MM-DD
#
returnDate = 2018-10-14
#
# returnTimOfDate (OPTIONAL if roundtrip, otherwise ignored). Specifies the time of the day for the
# return trip. Like departureTimeOfDay, this field can be "anytime", "morning", "afternoon", or
# "evening"
#
#returnTimeOfDay = evening
#
# adultPassengersCount (REQUIRED). This value can be between 1 and 8. Southwest also supports senior
# rates, but these are not supported by swatcher
#
adultPassengersCount = 1
#
# The above options are used to drive the SWA REST API to select flights. The options that follow
# below are used to restrict further flight selection. For maxStops, maxDuration, and maxPrice, they
# have an AND relationship, so if all are set, they must all be true. The specificFlights option acts
# on its own - if the flight numbers match, the fare will be tracked, all others will be ignored
#
# maxStops (OPTIONAL) integer value limiting the number of stops searched for. Default is all
# flights, enter 0 for non-stop
#
maxStops = 0
#
# maxDuration (OPTIONAL) floating point value setting a limit for maximum flight duration in hours.
# Default is to search all flights SWA returns
#
#maxDuration=4.5
#
# maxPrice (OPTIONAL) this integer value sets a limit (in USD) for searching for fares. Fares above this
# amount will be ignored, while you will receive alerts for price changes below this amount
#
#maxPrice = 400
#
# specificFlights (OPTIONAL) is used if you are interested in only specific flights (who
# wants the 5AM non-stop that always comes up cheapest). This option is comma seperated, to
# allow specifying multiple flights. For a non-stop flight, this option will be just a single
# integer, but for a multi-stop flight, there might be multiple flight numbers,
# so in that instance, each flight should be separated by a / with no spaces in between (123/987)
#
#specificFlights = 437,144/743