mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 08:49:58 +00:00
parse multiple messages
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@150 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
138be61f7f
commit
d7aa7aa4f1
2 changed files with 46 additions and 11 deletions
|
@ -446,12 +446,17 @@ public final class BahnProvider implements NetworkProvider
|
|||
, Pattern.DOTALL);
|
||||
private static final Pattern P_DEPARTURES_COARSE = Pattern.compile("<div class=\"sqdetailsDep trow\">\n(.+?)</div>", Pattern.DOTALL);
|
||||
static final Pattern P_DEPARTURES_FINE = Pattern.compile(".*?" //
|
||||
+ "<span class=\"bold\">(.*?)</span>.*?" // line
|
||||
+ ">>\n\\s*(.+?)\\s*\n<br />\n" // destination
|
||||
+ "<a href=\"http://mobile\\.bahn\\.de/bin/mobil/traininfo.exe/dox[^\"]*\">\n" //
|
||||
+ "<span class=\"bold\">(.*?)</span>\n" // line
|
||||
+ "</a>\n" //
|
||||
+ ">>\n" //
|
||||
+ "\\s*(.+?)\\s*\n" // destination
|
||||
+ "<br />\n" //
|
||||
+ "<span class=\"bold\">(\\d{1,2}:\\d{2})</span>" // time
|
||||
+ "(?: <span class=\"[\\w ]*\">(?:(pünktl\\.)|ca. \\+(\\d+))</span>)?" // ontime, delay
|
||||
+ "(?: k\\.A\\.)?" //
|
||||
+ "(?:, <span class=\"red\">([^<]*)</span>)?" // message
|
||||
+ "(?:,<br/><a[^>]*><span class=\"red\">[^<]*</a></span>)?" // (ersatzzug message)
|
||||
+ "(?:(?:, )?(?:<span class=\"red\">heute )?(Gl\\. " + ParserUtils.P_PLATFORM + ")(?:\\s*</span>)?)?" // position
|
||||
, Pattern.DOTALL);
|
||||
private static final Pattern P_DEPARTURES_URI_STATION_ID = Pattern.compile("input=(\\d+)");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue