fix(route): 公視新聞網作者 (#11162)

This commit is contained in:
Ethan Shen 2022-10-27 21:51:32 +08:00 committed by GitHub
parent 032dcd98ea
commit 125f2733ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -38,7 +38,10 @@ module.exports = async (ctx) => {
const content = cheerio.load(detailResponse.data);
item.author = content('meta[property="article:author"]').attr('content').split(' / ')[0];
item.author = content('meta[name="author"]')
.attr('content')
.replace(/文//, '')
.split(/|\/|編譯|報導/)[0];
item.pubDate = timezone(parseDate(content('meta[property="article:published_time"]').attr('content')), +8);
item.category = content('.tag-list')
.first()