summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/efa14
1 files changed, 5 insertions, 9 deletions
diff --git a/bin/efa b/bin/efa
index fe5ab6e..d9bc5ed 100755
--- a/bin/efa
+++ b/bin/efa
@@ -64,12 +64,7 @@ foreach(split(/<span class="labelTextBold"> \d+\. Fahrt<\/span>/, $content)) {
}
foreach(split(/\n/)) {
if (/<span class="labelText">(?<content>[^<]+)<\/span>/) {
- # Ignore "ca. 3 Minuten" and similar
- # something like /^ca\. \d+ Minute/ does not work here, for some reason
- # (probably related to encoding fuckup)
- if ($+{content} !~ /^ca.*Minute/) {
- push(@{$raw->[$offer-1]}, $+{content});
- }
+ push(@{$raw->[$offer-1]}, $+{content});
}
}
$offer++;
@@ -92,9 +87,10 @@ if ($debug) {
for ($offer = 0; exists($raw->[$offer]); $offer++) {
for ($i = 0; @{$raw->[$offer]} >= (($i+1) * $groupsize); $i++) {
$offset = $i * $groupsize;
- # skip "Fußweg: x Minuten" messages (they're smaller than $groupsize)
- if ($raw->[$offer]->[$offset+2] =~ /ca.*Minute/) {
- splice(@$_, $offset, 5);
+ # If the first field is not a time we've got some additional information.
+ # Sadly, this script does not parse it yet, so it's ignored
+ until ($raw->[$offer]->[$offset] =~ /^\d+:\d+$/) {
+ splice(@{$raw->[$offer]}, $offset, 1) or last;
}
$cons->[$offer]->[$i] = {
deptime => $raw->[$offer]->[$offset],