From 1038b06a46fb9ae5d0296ecfadcfb620710ebda1 Mon Sep 17 00:00:00 2001 From: ztimson Date: Sat, 4 Jul 2026 22:30:31 -0400 Subject: [PATCH] AIS images --- server/src/ais.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/ais.mjs b/server/src/ais.mjs index 571c410..4c62499 100644 --- a/server/src/ais.mjs +++ b/server/src/ais.mjs @@ -93,7 +93,7 @@ export async function getAISImage(mmsi) { headers: { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36' } }) const html = await res.text() - const match = html.match(/]+class=["'][^"']*main-photo[^"']*["'][^>]*>/) + const match = html.match(/]*?class=["'][^"']*main-photo[^"']*["'][^>]*?>/) if (!match) throw new Error('No main-photo image found') const srcMatch = match[0].match(/src=["']([^"']+)["']/)