mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
fix(route): 修复知乎分类热榜链接 (#9220)
* [FIX] fix zhihu url * fix: use parseDate utils Co-authored-by: Hongfei Zhou <hongfei.zhou@motiion.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const got = require('@/utils/got');
|
||||
const { parseDate } = require('@/utils/parse-date');
|
||||
|
||||
const titles = {
|
||||
total: '全站',
|
||||
@@ -23,9 +24,9 @@ module.exports = async (ctx) => {
|
||||
});
|
||||
|
||||
const items = response.data.data.map((item) => ({
|
||||
link: item.target.url,
|
||||
link: `https://www.zhihu.com/question/${item.target.id}`,
|
||||
title: item.target.title,
|
||||
pubDate: new Date(item.target.created * 1000).toUTCString(),
|
||||
pubDate: parseDate(item.target.created * 1000),
|
||||
description: item.target.excerpt ? `<p>${item.target.excerpt}</p>` : '',
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user