mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-01 14:57:14 +08:00
fix(route/pts): Modify item parsing method. (#14526)
* fix(route/pts): Modify item parsing method. * .
This commit is contained in:
+5
-5
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user