Skip to content

Commit

Permalink
fix(route): 中华人民共和国交通运输部 (#15002)
Browse files Browse the repository at this point in the history
  • Loading branch information
ladeng07 authored Mar 28, 2024
1 parent c03ec9c commit 528b9c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/routes/gov/mot/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { parseDate } from '@/utils/parse-date';

export const route: Route = {
path: '/mot/:category{.+}?',
name: 'Unknown',
maintainers: [],
name: '中华人民共和国交通运输部',
maintainers: ['ladeng07'],
handler,
};

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 528b9c3

Please sign in to comment.