diff options
| author | Petter Reinholdtsen <pere@hungry.com> | 2015-01-17 21:02:14 +0100 | 
|---|---|---|
| committer | Petter Reinholdtsen <pere@hungry.com> | 2015-01-17 21:03:52 +0100 | 
| commit | 0bc6a3f36cc86e7f89cb10219558c464a58bfc0c (patch) | |
| tree | 36d68d6100f887b1c672e32f347c03edfcf8892f | |
| parent | 1db83ecb49ccf5abac641409adbfda5eb1d86d34 (diff) | |
Fix parser.
| -rw-r--r-- | scrapersources/postliste-bergen-kommune | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/scrapersources/postliste-bergen-kommune b/scrapersources/postliste-bergen-kommune index 096b06a..98a9ef6 100644 --- a/scrapersources/postliste-bergen-kommune +++ b/scrapersources/postliste-bergen-kommune @@ -80,14 +80,14 @@ def fetch_postjournal_day(parser, url, html, saver):                      raise ValueError("Something is strange, missing case ID")              matchObj = \ -                re.match("^Dokumentdato:\s+(\d{2}).(\d{2}).(\d{4})$", +                re.match("^Dokumentdato:[^\d]+(\d{2}).(\d{2}).(\d{4})$",                           line, re.M|re.I)              if matchObj:                  entry['docdate'] = "%s-%s-%s" % (matchObj.group(3),                                                   matchObj.group(2),                                                   matchObj.group(1))              matchObj = \ -                re.match("^Journal Dato:\s+(\d{2}).(\d{2}).(\d{4})$", +                re.match("^Journal Dato:[^\d]+(\d{2}).(\d{2}).(\d{4})$",                           line, re.M|re.I)              if matchObj:                  entry['recorddate'] = "%s-%s-%s" % (matchObj.group(3), @@ -143,7 +143,7 @@ print "Fetching public journal!"  parser = postlistelib.JournalParser(agency=agency) -parsedays = 46 +parsedays = 48  today = datetime.date.today()  i  = 1  | 
