From 528b9c357a8fbf638ddf6f80816dcf3b5cb08ef5 Mon Sep 17 00:00:00 2001 From: LMark <40017222+ladeng07@users.noreply.github.com> Date: Fri, 29 Mar 2024 03:31:37 +0800 Subject: [PATCH] =?UTF-8?q?fix(route):=20=E4=B8=AD=E5=8D=8E=E4=BA=BA?= =?UTF-8?q?=E6=B0=91=E5=85=B1=E5=92=8C=E5=9B=BD=E4=BA=A4=E9=80=9A=E8=BF=90?= =?UTF-8?q?=E8=BE=93=E9=83=A8=20(#15002)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/gov/mot/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/routes/gov/mot/index.ts b/lib/routes/gov/mot/index.ts index 0eef6b4aa..b273395c5 100644 --- a/lib/routes/gov/mot/index.ts +++ b/lib/routes/gov/mot/index.ts @@ -7,8 +7,8 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/mot/:category{.+}?', - name: 'Unknown', - maintainers: [], + name: '中华人民共和国交通运输部', + maintainers: ['ladeng07'], handler, }; @@ -48,7 +48,7 @@ async function handler(ctx) { item.title = content('meta[name="ArticleTitle"]').prop('content') || content('h1#ti').text(); item.description = content('div.TRS_UEDITOR').html(); - item.author = [...new Set([content('meta[name="Author"]').prop('content'), content('meta[name="ContentSource"]').prop('content')])].filter(Boolean); + item.author = [...new Set([content('meta[name="Author"]').prop('content'), content('meta[name="ContentSource"]').prop('content')])].find(Boolean); item.category = [ ...new Set([content('meta[name="ColumnName"]').prop('content'), content('meta[name="ColumnType"]').prop('content'), ...(content('meta[name="Keywords"]').prop('content')?.split(/,|;/) ?? [])]), ].filter(Boolean);