mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-12 20:08:49 +00:00
parse 'service down'
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@102 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
008a374696
commit
6e764348fb
1 changed files with 3 additions and 1 deletions
|
@ -364,7 +364,7 @@ public class SbbProvider implements NetworkProvider
|
|||
+ "<p class=\"qs\">\n(.+?)\n</p>.*?" //
|
||||
+ "(?:(.+)|(an dieser Haltestelle keines)).*?" //
|
||||
+ "<p class=\"links\">\n(.+?)\n</p>" //
|
||||
+ "|(Informationen zu))" //
|
||||
+ "|(Informationen zu)|(Verbindung zum Server konnte leider nicht hergestellt werden))" //
|
||||
+ ".*?" //
|
||||
, Pattern.DOTALL);
|
||||
private static final Pattern P_DEPARTURES_HEAD_FINE = Pattern.compile("" //
|
||||
|
@ -395,6 +395,8 @@ public class SbbProvider implements NetworkProvider
|
|||
return new QueryDeparturesResult(uri, Status.NO_INFO);
|
||||
else if (mHeadCoarse.group(5) != null)
|
||||
return new QueryDeparturesResult(uri, Status.INVALID_STATION);
|
||||
else if (mHeadCoarse.group(6) != null)
|
||||
return new QueryDeparturesResult(uri, Status.SERVICE_DOWN);
|
||||
|
||||
final String c = mHeadCoarse.group(1) + mHeadCoarse.group(4);
|
||||
final Matcher mHeadFine = P_DEPARTURES_HEAD_FINE.matcher(c);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue