From f1e82d61abec4d0f14bbdce30deca750ddd8a300 Mon Sep 17 00:00:00 2001 From: cnk Date: Tue, 21 Jan 2025 23:45:18 +0800 Subject: [PATCH] fix(routes/qstheory/magazine): adapt to origin site changed (#18181) - origin website now use relative path - origin website changed struct for list page(no '') --- lib/routes/qstheory/magazine.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/routes/qstheory/magazine.ts b/lib/routes/qstheory/magazine.ts index 57f8767b7..4096ddd49 100644 --- a/lib/routes/qstheory/magazine.ts +++ b/lib/routes/qstheory/magazine.ts @@ -16,7 +16,7 @@ export const route: Route = { }, ], name: '在线读刊', - maintainers: ['TonyRL'], + maintainers: ['TonyRL', 'cscnk52'], handler, }; @@ -34,14 +34,14 @@ async function handler(ctx) { const $item = $(item); return { title: $item.text(), - link: $item.attr('href')!, + link: new URL($item.attr('href')!, baseUrl).href, }; }); const issueResponse = await ofetch(yearList[0].link); const $$ = cheerio.load(issueResponse); - const list = $$('.highlight span a') + const list = $$('.highlight a') .toArray() .map((item) => { const $item = $$(item);