Show next 90 minutes instead of 30 minutes, necessary for good nightline
authorFlorian Schweikert <kelvan@logic.at>
Sat, 15 Oct 2011 01:43:45 +0000 (03:43 +0200)
committerFlorian Schweikert <kelvan@logic.at>
Sat, 15 Oct 2011 01:43:45 +0000 (03:43 +0200)
results

gotovienna/realtime.py

index 8d2c4d2..594bf79 100644 (file)
@@ -80,8 +80,9 @@ class ITipParser:
         if not url:
             # FIXME prevent from calling this method with None
             return []
-
-        bs = BeautifulSoup(urlopen(url))
+        
+        # open url for 90 min timeslot / get departure for next 90 min
+        bs = BeautifulSoup(urlopen(url + "&departureSizeTimeSlot=90"))
         result_lines = bs.findAll('table')[-1].findAll('tr')
 
         dep = []
@@ -212,4 +213,4 @@ class Line:
             # TODO return departures
             raise NotImplementedError()
         else:
-            raise StationNotFoundError('There is no stationname called "%s" at route of line "%s"' % (stationname, self.name))
\ No newline at end of file
+            raise StationNotFoundError('There is no stationname called "%s" at route of line "%s"' % (stationname, self.name))