mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
fix: jianshu can't get fulltext and pubDate (#3104)
This commit is contained in:
@@ -8,11 +8,7 @@ async function load(link) {
|
||||
const $ = cheerio.load(response.data);
|
||||
|
||||
// 解析日期
|
||||
const date = new Date(
|
||||
$('.publish-time')
|
||||
.text()
|
||||
.match(/\d{4}.\d{2}.\d{2} \d{2}:\d{2}/)
|
||||
);
|
||||
const date = new Date($('time').attr('datetime'));
|
||||
const timeZone = 8;
|
||||
const serverOffset = date.getTimezoneOffset() / 60;
|
||||
const pubDate = new Date(date.getTime() - 60 * 60 * 1000 * (timeZone + serverOffset)).toUTCString();
|
||||
@@ -31,7 +27,7 @@ async function load(link) {
|
||||
`);
|
||||
});
|
||||
// 提取内容
|
||||
const description = $('.show-content-free').html();
|
||||
const description = $('article').html();
|
||||
|
||||
return { description, pubDate };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user