mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-12 08:10:32 +08:00
refactor: format
This commit is contained in:
@@ -13,10 +13,10 @@ async function load(link) {
|
||||
const $ = cheerio.load(response.data);
|
||||
|
||||
// 解析日期
|
||||
//const date = new Date($('time').attr('datetime'));
|
||||
//const timeZone = 8 * 60;
|
||||
//const serverOffset = date.getTimezoneOffset();
|
||||
//const pubDate = new Date(date.getTime() + 60 * 1000 * (timeZone + serverOffset)).toUTCString();
|
||||
// const date = new Date($('time').attr('datetime'));
|
||||
// const timeZone = 8 * 60;
|
||||
// const serverOffset = date.getTimezoneOffset();
|
||||
// const pubDate = new Date(date.getTime() + 60 * 1000 * (timeZone + serverOffset)).toUTCString();
|
||||
|
||||
// 提取内容
|
||||
const description = $('.article-content')
|
||||
@@ -30,7 +30,7 @@ async function load(link) {
|
||||
const ProcessFeed = async (list, caches) =>
|
||||
await Promise.all(
|
||||
list.map(async (item) => {
|
||||
//解析时间,补偿时区offset
|
||||
// 解析时间,补偿时区offset
|
||||
const pubdate = new Date();
|
||||
pubdate.setTime(Date.parse(item.createdAt) - 8 * 60 * 60 * 1000);
|
||||
// 列表上提取到的信息
|
||||
|
||||
Reference in New Issue
Block a user