mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-10-28 03:28:35 +08:00
fix(jihs/idwr): fix URL (#22685)
This commit is contained in:
@@ -13,7 +13,7 @@ export const handler = async (ctx: Context): Promise<Data> => {
|
||||
const limit = Number(ctx.req.query('limit') ?? '30');
|
||||
|
||||
const baseUrl = 'https://id-info.jihs.go.jp';
|
||||
const targetUrl: string = new URL(`surveillance/idwr/jp/idwr/${year}/`, baseUrl).href;
|
||||
const targetUrl: string = new URL(`surveillance/idwr/idwr/${year}/`, baseUrl).href;
|
||||
|
||||
const response = await ofetch(targetUrl);
|
||||
const $: CheerioAPI = load(response);
|
||||
@@ -93,7 +93,7 @@ export const route: Route = {
|
||||
},
|
||||
},
|
||||
description: `::: tip
|
||||
To subscribe to [感染症発生動向調査週報](https://id-info.jihs.go.jp/surveillance/idwr/jp/idwr/2025/), where the source URL is \`https://id-info.jihs.go.jp/surveillance/idwr/jp/idwr/2025/\`, extract the certain parts from this URL to be used as parameters, resulting in the route as [\`/go/jihs/idwr/2025\`](https://rsshub.app/go/jihs/idwr/2025).
|
||||
To subscribe to [感染症発生動向調査週報](https://id-info.jihs.go.jp/surveillance/idwr/idwr/2025/), where the source URL is \`https://id-info.jihs.go.jp/surveillance/idwr/idwr/2025/\`, extract the certain parts from this URL to be used as parameters, resulting in the route as [\`/go/jihs/idwr/2025\`](https://rsshub.app/go/jihs/idwr/2025).
|
||||
:::`,
|
||||
categories: ['government'],
|
||||
features: {
|
||||
@@ -107,7 +107,7 @@ To subscribe to [感染症発生動向調査週報](https://id-info.jihs.go.jp/s
|
||||
},
|
||||
radar: [
|
||||
{
|
||||
source: ['id-info.jihs.go.jp/surveillance/idwr/jp/idwr/:year'],
|
||||
source: ['id-info.jihs.go.jp/surveillance/idwr/idwr/:year'],
|
||||
target: (params) => {
|
||||
const year: string = params.year;
|
||||
|
||||
@@ -130,7 +130,7 @@ To subscribe to [感染症発生動向調査週報](https://id-info.jihs.go.jp/s
|
||||
},
|
||||
},
|
||||
description: `::: tip
|
||||
若订阅 [传染病发生动向调查周报](https://id-info.jihs.go.jp/surveillance/idwr/jp/idwr/2025/),网址为 \`https://id-info.jihs.go.jp/surveillance/idwr/jp/idwr/2025/\`,请截取 \`https://id-info.jihs.go.jp/surveillance/idwr/jp/idwr/\` 到末尾 \`/\` 的部分 \`2025\` 作为 \`year\` 参数填入,此时目标路由为 [\`/go/jihs/idwr/2025\`](https://rsshub.app/go/jihs/idwr/2025)。
|
||||
若订阅 [传染病发生动向调查周报](https://id-info.jihs.go.jp/surveillance/idwr/idwr/2025/),网址为 \`https://id-info.jihs.go.jp/surveillance/idwr/idwr/2025/\`,请截取 \`https://id-info.jihs.go.jp/surveillance/idwr/idwr/\` 到末尾 \`/\` 的部分 \`2025\` 作为 \`year\` 参数填入,此时目标路由为 [\`/go/jihs/idwr/2025\`](https://rsshub.app/go/jihs/idwr/2025)。
|
||||
:::`,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user