fix(route/pts): Modify item parsing method. (#14526)

* fix(route/pts): Modify item parsing method.

* .
This commit is contained in:
Andvari
2024-02-23 00:37:58 +08:00
committed by GitHub
parent 1619e47d75
commit e93472638f
+5 -5
View File
@@ -38,11 +38,11 @@ module.exports = async (ctx) => {
const content = cheerio.load(detailResponse.data);
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.author = content('.reporter-container a')
.toArray()
.map((e) => ({ name: content(e).text() }));
item.pubDate = timezone(parseDate(content('.article-time .mr-2 time').text()), +8);
item.updated = timezone(parseDate(content('.article-time span:nth-child(2) time').text()), +8);
item.category = content('.tag-list')
.first()
.find('.blue-tag')