From bb1f55a1892303b3f43c5baa9f0fc4dab078dba8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jannes=20H=C3=B6ke?= Date: Mon, 27 May 2024 11:04:45 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=BD=EF=B8=8F=20Change=20back=20to=20pr?= =?UTF-8?q?evious=20widths=20for=20parsing=20stations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scraper/src/loadStations.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scraper/src/loadStations.js b/scraper/src/loadStations.js index fbbf935..85a60fe 100644 --- a/scraper/src/loadStations.js +++ b/scraper/src/loadStations.js @@ -22,10 +22,10 @@ module.exports = async function loadStations (baseMinYear) { const raw = (await got(url, { encoding: 'latin1' })).body; const stations = parseFixedWidth(raw, { // The format was changed sometime between 2024-04-15 and 2024-05-01 - //skip: 3, - //widths: [5, 9, 9, 15, 12, 10, 42, 22], + // ...and changed back again. + //widths: [21, 9, 9, 14, 12, 10, 81, 843], skip: 2, - widths: [21, 9, 9, 14, 12, 10, 81, 843], + widths: [5, 9, 9, 15, 12, 10, 42, 22], names: ['id', 'from', 'to', 'altitude', 'lat', 'lon', 'name', 'state'], }) .map(station => ({