From 44dd5d381bf8b0caebb73426066e74ed2ee56c6a Mon Sep 17 00:00:00 2001 From: Markus Holtermann Date: Sat, 26 Jan 2013 02:12:28 +0100 Subject: PEP-8 --- bvggrabber/api/scheduleddeparture.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'bvggrabber/api/scheduleddeparture.py') diff --git a/bvggrabber/api/scheduleddeparture.py b/bvggrabber/api/scheduleddeparture.py index ba8664f..4531caa 100644 --- a/bvggrabber/api/scheduleddeparture.py +++ b/bvggrabber/api/scheduleddeparture.py @@ -5,7 +5,7 @@ import datetime from bs4 import BeautifulSoup -from bvggrabber.api import QueryApi, Departure +from bvggrabber.api import QueryApi, Departure, hourformat SCHEDULED_QUERY_API_ENDPOINT = 'http://mobil.bvg.de/Fahrinfo/bin/stboard.bin/dox' @@ -40,7 +40,12 @@ class ScheduledDepartureQueryApi(QueryApi): def call(self): - params = {'input': self.station_enc, 'time': datetime.datetime.now().strftime('%H:%M'), 'date': datetime.datetime.now().strftime('%d.%m.%Y'),'productsFilter': self.vehicles, 'maxJourneys': self.limit, 'start': 'yes'} + params = {'input': self.station_enc, + 'time': hourformat(datetime.datetime.now()), + 'date': datetime.datetime.now().strftime('%d.%m.%Y'), + 'productsFilter': self.vehicles, + 'maxJourneys': self.limit, + 'start': 'yes'} response = requests.get(SCHEDULED_QUERY_API_ENDPOINT, params=params) if response.status_code == requests.codes.ok: soup = BeautifulSoup(response.text) -- cgit v1.2.3