diff options
author | Markus Holtermann <info@markusholtermann.eu> | 2013-01-26 02:12:28 +0100 |
---|---|---|
committer | Markus Holtermann <info@markusholtermann.eu> | 2013-01-26 02:12:28 +0100 |
commit | 44dd5d381bf8b0caebb73426066e74ed2ee56c6a (patch) | |
tree | c88435a9aea6b5e95f29960f9636c0c9e76d365e /bvggrabber | |
parent | e4f38481a629266d4f2b8231b92386d566f1568f (diff) | |
download | bvg-grabber-44dd5d381bf8b0caebb73426066e74ed2ee56c6a.tar.gz bvg-grabber-44dd5d381bf8b0caebb73426066e74ed2ee56c6a.tar.bz2 bvg-grabber-44dd5d381bf8b0caebb73426066e74ed2ee56c6a.zip |
PEP-8
Diffstat (limited to 'bvggrabber')
-rw-r--r-- | bvggrabber/api/scheduleddeparture.py | 9 |
1 files changed, 7 insertions, 2 deletions
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) |