From 12a004ad3bcc2150dca5ae45c963161e7eedc25c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20P=C3=A9rez-Cerezo?= Date: Thu, 11 Oct 2018 16:22:31 +0200 Subject: Fix Issue #11 from github --- bvggrabber/api/actualdeparture.py | 3 ++- bvggrabber/api/scheduleddeparture.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'bvggrabber') diff --git a/bvggrabber/api/actualdeparture.py b/bvggrabber/api/actualdeparture.py index e7c084b..00b6d1d 100644 --- a/bvggrabber/api/actualdeparture.py +++ b/bvggrabber/api/actualdeparture.py @@ -51,12 +51,13 @@ class ActualDepartureQueryApi(QueryApi): departures = [] for row in rows: if row.parent.name == 'tbody': + stro = row.find_all("strong") td = row.find_all('td') if td: dep = Departure(start=self.station, end=td[2].text.strip(), when=td[0].text.strip(), - line=td[1].text.strip()) + line=stro[1].text.strip()) departures.append(dep) return Response(True, self.station, departures) else: diff --git a/bvggrabber/api/scheduleddeparture.py b/bvggrabber/api/scheduleddeparture.py index f316b6e..101f692 100644 --- a/bvggrabber/api/scheduleddeparture.py +++ b/bvggrabber/api/scheduleddeparture.py @@ -70,10 +70,11 @@ class ScheduledDepartureQueryApi(QueryApi): departures = [] for row in rows: tds = row.find_all('td') + stro = row.find_all('strong') dep = Departure(start=self.station, end=tds[2].text.strip(), when=tds[0].text.strip(), - line=tds[1].text.strip()) + line=stro[1].text.strip()) departures.append(dep) return Response(True, self.station, departures) else: -- cgit v1.2.3