From e4db44b084582236111e62d2767542d1a4dfb99d Mon Sep 17 00:00:00 2001 From: Gereon Dusella Date: Thu, 12 Dec 2019 20:26:52 +0100 Subject: changed url protocol to HTTPS, fixed crawler --- bvggrabber/api/actualdeparture.py | 6 +++--- bvggrabber/api/scheduleddeparture.py | 2 +- setup.py | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/bvggrabber/api/actualdeparture.py b/bvggrabber/api/actualdeparture.py index e7c084b..7d90ca0 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, Response -ACTUAL_API_ENDPOINT = 'http://mobil.bvg.de/Fahrinfo/bin/stboard.bin/dox?ld=0.1&rt=0&' +ACTUAL_API_ENDPOINT = 'https://mobil.bvg.de/Fahrinfo/bin/stboard.bin/dox?ld=0.1&rt=0&' class ActualDepartureQueryApi(QueryApi): @@ -43,8 +43,8 @@ class ActualDepartureQueryApi(QueryApi): return Response(False) else: # The station seems to exist - result = soup.find('div', {'id': '', - 'class': 'ivu_result_box'}) + result = soup.find('table', {'id': '', + 'class': 'ivu_table'}) if result is None: return Response(True, self.station, []) rows = result.find_all('tr') diff --git a/bvggrabber/api/scheduleddeparture.py b/bvggrabber/api/scheduleddeparture.py index f316b6e..bceafc7 100644 --- a/bvggrabber/api/scheduleddeparture.py +++ b/bvggrabber/api/scheduleddeparture.py @@ -10,7 +10,7 @@ from bvggrabber.api import QueryApi, Departure, Response, timeformat from bvggrabber.utils.format import dateformat, int2bin -SCHEDULED_API_ENDPOINT = 'http://mobil.bvg.de/Fahrinfo/bin/stboard.bin/dox' +SCHEDULED_API_ENDPOINT = 'https://mobil.bvg.de/Fahrinfo/bin/stboard.bin/dox' class Vehicle(): diff --git a/setup.py b/setup.py index 8661e64..ca176c1 100755 --- a/setup.py +++ b/setup.py @@ -38,5 +38,9 @@ setup( 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', ], ) -- cgit v1.2.3