i dont know whats the problem, but it wont work.
[{"id":"7c406736d4aa3380","type":"inject","z":"f1c196de.aec348","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":260,"y":860,"wires":[["9fb94f39f2c85611"]]},{"id":"9fb94f39f2c85611","type":"function","z":"f1c196de.aec348","name":"puppeteer","func":"node.status({fill:\"green\",shape:\"dot\",text:\"Processing...\"});\n\nconst browser = await puppeteer.launch({\n headless: true,\n executablePath: '/usr/bin/chromium-browser',\n args: ['--no-sandbox', '--disable-setuid-sandbox']\n});\nconst page = await browser.newPage();\nawait page.goto('https://www.bad-schallerbach.at/system/web/kalender.aspx?sprache=1&menuonr=226753868&typids=226758838,226758840,226758842,226758844/', {\n waitUntil: 'networkidle2' // <-- good practice to wait for page to fully load \n});\n\nawait page.click('.bemCookieOverlay__btn--save');\n\nawait page.waitForTimeout(3000)\n\nmsg.payload = await page.evaluate(() => {\n // @ts-ignore\n return Array.from(document.querySelectorAll(\".ris_table tr\")).map(el => el.innerText)\n})\n\n// make the data nice ;)\nmsg.payload = msg.payload.map(el => { return { \"DATUM\": el.split(\"\\n\")[0], \"TERMIN\": el.split(\"\\n\")[1] } })\n\nawait browser.close();\n\nnode.status({});\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[{"var":"puppeteer","module":"puppeteer"}],"x":450,"y":860,"wires":[["9620fe8243f9691e"]]},{"id":"9620fe8243f9691e","type":"debug","z":"f1c196de.aec348","name":"debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":670,"y":860,"wires":[]}]
Since the update i have another problem... node red autostart doesn't work anymore
sudo systemctl enable nodered.service
dont work anymore
and the next problem is that node red is maybe crashing after a few minutes
since the update i can only start node-red with ./node-red not with node-red-start