diff options
-rw-r--r-- | bvggrabber/api/actualdeparture.py | 7 | ||||
-rw-r--r-- | bvggrabber/api/scheduleddeparture.py | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/bvggrabber/api/actualdeparture.py b/bvggrabber/api/actualdeparture.py index e4c3c26..c55a47e 100644 --- a/bvggrabber/api/actualdeparture.py +++ b/bvggrabber/api/actualdeparture.py @@ -6,7 +6,7 @@ from bs4 import BeautifulSoup from bvggrabber.api import QueryApi, Departure -ACTUAL_QUERY_API_ENDPOINT = 'http://mobil.bvg.de/IstAbfahrtzeiten/index/mobil' +ACTUAL_API_ENDPOINT = 'http://mobil.bvg.de/IstAbfahrtzeiten/index/mobil' class ActualDepartureQueryApi(QueryApi): @@ -23,7 +23,7 @@ class ActualDepartureQueryApi(QueryApi): def call(self): params = {'input': self.station_enc} - response = requests.get(ACTUAL_QUERY_API_ENDPOINT, params=params) + response = requests.get(ACTUAL_API_ENDPOINT, params=params) if response.status_code == requests.codes.ok: soup = BeautifulSoup(response.text) if soup.find_all('form'): @@ -38,7 +38,8 @@ class ActualDepartureQueryApi(QueryApi): return (False, []) else: # The station seems to exist - result = soup.find('div', {'id': '', 'class': 'ivu_result_box'}) + result = soup.find('div', {'id': '', + 'class': 'ivu_result_box'}) if result is None: return (False, []) rows = result.find_all('tr') diff --git a/bvggrabber/api/scheduleddeparture.py b/bvggrabber/api/scheduleddeparture.py index 4858d18..5387057 100644 --- a/bvggrabber/api/scheduleddeparture.py +++ b/bvggrabber/api/scheduleddeparture.py @@ -10,7 +10,7 @@ from bvggrabber.api import QueryApi, Departure, hourformat from bvggrabber.utils.format import int2bin -SCHEDULED_QUERY_API_ENDPOINT = 'http://mobil.bvg.de/Fahrinfo/bin/stboard.bin/dox' +SCHEDULED_API_ENDPOINT = 'http://mobil.bvg.de/Fahrinfo/bin/stboard.bin/dox' class Vehicle(): @@ -48,7 +48,7 @@ class ScheduledDepartureQueryApi(QueryApi): 'productsFilter': self.vehicles, 'maxJourneys': self.limit, 'start': 'yes'} - response = requests.get(SCHEDULED_QUERY_API_ENDPOINT, params=params) + response = requests.get(SCHEDULED_API_ENDPOINT, params=params) if response.status_code == requests.codes.ok: soup = BeautifulSoup(response.text) if soup.find('span', 'error'): |