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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

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]);
}