fix(route): 公視新聞網作者 (#11162)
This commit is contained in:
+4
-1
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user