diff --git a/lib/routes/gov/customs/list.ts b/lib/routes/gov/customs/list.ts index 599efd3b9..7aa23b615 100644 --- a/lib/routes/gov/customs/list.ts +++ b/lib/routes/gov/customs/list.ts @@ -31,8 +31,8 @@ export const route: Route = { handler, url: 'www.customs.gov.cn/', description: `:::warning - 由于区域限制,建议在国内 IP 的机器上自建 - :::`, +由于区域限制,建议在国内 IP 的机器上自建 +:::`, }; async function handler(ctx) { @@ -81,6 +81,9 @@ async function handler(ctx) { const out = await Promise.all( list.map((info) => cache.tryGet(info.link, async () => { + if (info.link.endsWith('.pdf') || info.link.endsWith('.doc')) { + return info; + } const response = await puppeteerGet(info.link, browser); const $ = load(response); let date; diff --git a/lib/routes/gov/customs/namespace.ts b/lib/routes/gov/customs/namespace.ts new file mode 100644 index 000000000..e67beeae3 --- /dev/null +++ b/lib/routes/gov/customs/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中华人民共和国海关总署', + url: 'www.customs.gov.cn', + categories: ['government'], +};