Browse Source

Support new status line format

master
Kenneth Bruen 4 weeks ago
parent
commit
a9f1838fd6
Signed by: kbruen
GPG Key ID: C1980A470C3EE5B1
  1. 2
      scraper/src/Scrapers/Train.cs

2
scraper/src/Scrapers/Train.cs

@ -26,7 +26,7 @@ namespace InfoferScraper.Scrapers {
private static readonly Regex SlRegex = private static readonly Regex SlRegex =
new( new(
@"^(?:Fără|([0-9]+)\smin)\s(întârziere|mai\sdevreme)\sla\s(trecerea\sfără\soprire\sprin|sosirea\sîn|plecarea\sdin)\s(.+)\.$"); @"^(?:Fără|([0-9]+)\smin)\s(întârziere|mai\sdevreme)\sla\s(trecerea\sfără\soprire\sprin|sosirea\sîn|plecarea\sdin)\s(.+)(?:\s\(Raportat\sla\s([0-9]+):([0-9]+)\))?\.");
private static readonly Dictionary<char, StatusKind> SlStateMap = new() { private static readonly Dictionary<char, StatusKind> SlStateMap = new() {
{ 't', StatusKind.Passing }, { 't', StatusKind.Passing },

Loading…
Cancel
Save