Adjust default connection time.
This commit is contained in:
parent
b487307d4a
commit
ad1aa57c00
2 changed files with 6 additions and 6 deletions
8
app.py
8
app.py
|
|
@ -124,15 +124,15 @@ def results(station_crs, slug, travel_date):
|
|||
try:
|
||||
min_connection = int(request.args.get("min_connection", 50))
|
||||
except ValueError:
|
||||
min_connection = 50
|
||||
min_connection = 70
|
||||
if min_connection not in VALID_MIN_CONNECTIONS:
|
||||
min_connection = 50
|
||||
min_connection = 70
|
||||
try:
|
||||
max_connection = int(request.args.get("max_connection", 110))
|
||||
except ValueError:
|
||||
max_connection = 110
|
||||
max_connection = 150
|
||||
if max_connection not in VALID_MAX_CONNECTIONS:
|
||||
max_connection = 110
|
||||
max_connection = 150
|
||||
|
||||
user_agent = request.headers.get("User-Agent", rtt_scraper.DEFAULT_UA)
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
</label>
|
||||
<select id="min_connection" name="min_connection" class="form-control">
|
||||
{% for mins in valid_min_connections %}
|
||||
<option value="{{ mins }}" {% if mins == 50 %}selected{% endif %}>{{ mins }} min</option>
|
||||
<option value="{{ mins }}" {% if mins == 70 %}selected{% endif %}>{{ mins }} min</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
|
@ -60,7 +60,7 @@
|
|||
</label>
|
||||
<select id="max_connection" name="max_connection" class="form-control">
|
||||
{% for mins in valid_max_connections %}
|
||||
<option value="{{ mins }}" {% if mins == 110 %}selected{% endif %}>{{ mins }} min</option>
|
||||
<option value="{{ mins }}" {% if mins == 150 %}selected{% endif %}>{{ mins }} min</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue