style: auto format

This commit is contained in:
github-actions[bot] 2025-02-24 04:49:57 +00:00
parent 9fdab5a7a2
commit 3d828400f2
1 changed files with 6 additions and 3 deletions

View File

@ -74,13 +74,16 @@ async function handler(ctx) {
const onclickValue = $('.button').first().attr('onclick');
const targetUrl = onclickValue.match(/window\.open\('([^']+)'/)[1];
return {url: targetUrl};
})) as { url: string};
return { url: targetUrl };
})) as { url: string };
// 获取重定向后的url和safeid
const redirectResponse = await ofetch.raw(domainInfo.url);
const currentUrl = `${redirectResponse.url}thread.php?fid-${id}.html`;
const redirectPageContent = load(redirectResponse._data);
const safeId = redirectPageContent('script').text().match(/var safeid='(.*?)',/)?.[1] ?? '';
const safeId =
redirectPageContent('script')
.text()
.match(/var safeid='(.*?)',/)?.[1] ?? '';
const response = await ofetch.raw(currentUrl, {
headers: {