From b535d45e977d0e7fdd9589dee01ed63eeb2b4e2f Mon Sep 17 00:00:00 2001 From: Tobias Lehmann Date: Mon, 20 Oct 2025 11:33:55 +0200 Subject: [PATCH] optimized webuntil getbearer loading directly school login --- files/scripts/webuntis/getbearer.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/files/scripts/webuntis/getbearer.js b/files/scripts/webuntis/getbearer.js index a1766a2..28bd62c 100644 --- a/files/scripts/webuntis/getbearer.js +++ b/files/scripts/webuntis/getbearer.js @@ -5,14 +5,14 @@ export default async function ({ page, context }) { const { - url = "https://webuntis.com/#/basic/login", + url = "https://mese.webuntis.com/WebUntis/?school=LMG+Crailsheim", username = "LehmanLuc", password = "", school = "LMG Crailsheim", // ggf. "Lise-Meitner-Gymnasium" debug = true, - timeoutMs = 60000, - maxTimeout = 15000, - screenshotFullPage = true, + timeoutMs = 10000, + maxTimeout = 3000, + screenshotFullPage = false, output = "json" // "png" | "json" } = context || {}; @@ -438,6 +438,7 @@ export default async function ({ page, context }) { + const buf = await takePngBuffer(); const screenshot_b64 = buf ? "data:image/png;base64," + buf.toString("base64") : null;