fix(route/udn): Correct regex (#19033)

This commit is contained in:
Andvari
2025-05-08 00:26:11 +08:00
committed by GitHub
parent f8242fe166
commit b9ca4467be
+1 -1
View File
@@ -53,7 +53,7 @@ async function handler(ctx) {
let result = await got(link);
// VIP article requires redirection
// e.g. https://udn.com/news/story/7331/6576320
const vip = result.data.match(/<script language=javascript>window\.location\.href="(https?:\/\/[^"]+")/);
const vip = result.data.match(/<script language=javascript>window\.location\.href="(https?:\/\/[^"]+)"/);
if (vip) {
result = await got(vip[1]);
}