From 91a751de784992cad222e368a10d753192b7ebef Mon Sep 17 00:00:00 2001 From: cheetah Date: Fri, 16 Dec 2022 21:38:20 +0100 Subject: [PATCH] ignoring dwd garbage --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 15b8a9c..fccf15a 100644 --- a/index.js +++ b/index.js @@ -56,12 +56,14 @@ async function checkWOMAS() { let dashboardData = await axios.get('https://warnung.bund.de/api31/dashboard/' + regId + '.json') //console.log('dashboardData', dashboardData.data) for (let alarmHead of dashboardData.data) { + if (alarmHead.id.indexOf('dwd.') == 0) continue if (!stateMachine[ alarmHead.id ]) { let alarmData = await axios.get('https://nina.api.proxy.bund.dev/api31/warnings/' + alarmHead.id + '.json') for (let infoData of alarmData.data.info) { await sendPage(region.preset, replaceUmlaute(infoData.headline)) + break } - console.log(stateMachine[ alarmHead.id ]) + console.log(alarmHead.id, stateMachine[ alarmHead.id ]) stateMachine[ alarmHead.id ] = alarmData.data.info.length } //console.log('alarmData', alarmData.data)