Skip to content

Commit

Permalink
fix(crawler/sl): adapt regexes
Browse files Browse the repository at this point in the history
  • Loading branch information
kkkrist committed Jan 29, 2021
1 parent ff6a16e commit 9732737
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/crawler/lib/sl.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,18 @@ module.exports = () =>
)

const infectedMatch = content.match(
/nachgewiesenen Infizierten .*? auf ([0-9.]+)/
/positiv getesteten Personen .*? bei ([0-9.]+)/
)

const recoveredMatch = content.match(
/Wieder genesen sind davon ([0-9.]+) Personen/
/, ([0-9.]+) Personen sind genesen/
)

const quarantinedMatch = content.match(
/In Quarantäne befinden sich derzeit ([0-9.]+) Personen/
/derzeit ([0-9.]+) Personen in Quarantäne/
)

const deathsMatch = content.match(
/Die Gesamtzahl der Verstorbenen beträgt (.*?)\./
)
const deathsMatch = content.match(/und (.*?) verstorben\./)

if (!dateMatch) {
return reject(new Error("Couldn't parse date"))
Expand Down

0 comments on commit 9732737

Please sign in to comment.