fix(route): cnbeta (#13714)

This commit is contained in:
Tony
2023-11-07 21:17:32 +08:00
committed by GitHub
parent b1f2be63ce
commit 125c24eb97
2 changed files with 18 additions and 9 deletions
+3
View File
@@ -1,5 +1,7 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
const timezone = require('@/utils/timezone');
const { parseDate } = require('@/utils/parse-date');
const rootUrl = 'https://www.cnbeta.com.tw';
@@ -17,6 +19,7 @@ module.exports = {
item.description = content('.article-summary').html() + content('.article-content').html();
item.author = content('header.title div.meta span.source').text();
item.pubDate ??= timezone(parseDate(content('.meta span').first().text(), 'YYYY年MM月DD日 HH:mm'), +8);
return item;
})