diff options
author | Markus Holtermann <info@markusholtermann.eu> | 2013-01-25 21:59:28 +0100 |
---|---|---|
committer | Markus Holtermann <info@markusholtermann.eu> | 2013-01-25 21:59:28 +0100 |
commit | 3e3bad7ac63819d6a4195eba53bf35f5dd9cffbe (patch) | |
tree | e68b0e041474de92a84f1a86a9f135c30fe62a8d /bvggrabber | |
parent | 6b3a20f1c5dcddf74491e28e8960f174d0e1c642 (diff) | |
download | bvg-grabber-3e3bad7ac63819d6a4195eba53bf35f5dd9cffbe.tar.gz bvg-grabber-3e3bad7ac63819d6a4195eba53bf35f5dd9cffbe.tar.bz2 bvg-grabber-3e3bad7ac63819d6a4195eba53bf35f5dd9cffbe.zip |
One should use ``import datetime`` instead of ``from datetime import datetime``
Diffstat (limited to 'bvggrabber')
-rw-r--r-- | bvggrabber/api/scheduleddeparture.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bvggrabber/api/scheduleddeparture.py b/bvggrabber/api/scheduleddeparture.py index 093d248..cf374f6 100644 --- a/bvggrabber/api/scheduleddeparture.py +++ b/bvggrabber/api/scheduleddeparture.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import requests -from datetime import datetime +import datetime from bs4 import BeautifulSoup @@ -40,7 +40,7 @@ class ScheduledDepartureQueryApi(QueryApi): def call(self): - params = {'input': self.station_enc, 'time': datetime.now().strftime('%H:%M'), 'date': datetime.now().strftime('%d.%m.%Y'),'productsFilter': self.vehicles, 'maxJourneys': self.limit, 'start': 'yes'} + 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'} response = requests.get(SCHEDULED_QUERY_API_ENDPOINT, params=params) if response.status_code == requests.codes.ok: soup = BeautifulSoup(response.text) |