mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-11 15:47:48 +08:00
fix: correct houxu/lives meta (#2837)
This commit is contained in:
@@ -2,21 +2,20 @@ const got = require('@/utils/got');
|
||||
|
||||
const getLiveUrlById = (liveId) => `https://houxu.app/lives/${liveId}`;
|
||||
|
||||
const getLinkDesc = (link) => (link.media === null ? link.description : link.media.name + ':<br />' + link.description);
|
||||
|
||||
const realtimeHandler = async () => {
|
||||
const res = await got.get('https://houxu.app/api/1/lives/updated/');
|
||||
|
||||
const out = res.data.results.map((el) => ({
|
||||
title: el.last.link.title,
|
||||
description: getLinkDesc(el.last.link),
|
||||
description: el.last.link.description,
|
||||
author: el.last.link.media ? el.last.link.media.name : null,
|
||||
link: getLiveUrlById(el.id),
|
||||
guid: 'realtime-' + el.id + '-' + el.last.id,
|
||||
pubDate: new Date(el.last.create_at).toUTCString(),
|
||||
pubDate: new Date(el.news_update_at).toUTCString(),
|
||||
}));
|
||||
|
||||
return {
|
||||
title: 'Live 实时 - 后续',
|
||||
title: '往事进展 - 后续',
|
||||
description: 'Live 往事进展',
|
||||
link: 'https://houxu.app/lives/realtime',
|
||||
item: out,
|
||||
@@ -30,13 +29,13 @@ const newHandler = async () => {
|
||||
.map((el) => ({
|
||||
title: el.object.title,
|
||||
description: el.object.summary,
|
||||
link: getLiveUrlById(el.id),
|
||||
guid: 'new-' + el.id + '-' + el.object.id,
|
||||
pubDate: new Date(el.object.create_at).toUTCString(),
|
||||
link: getLiveUrlById(el.object.id),
|
||||
guid: 'new-' + el.object.id,
|
||||
pubDate: new Date(el.publish_at).toUTCString(),
|
||||
}));
|
||||
return {
|
||||
title: '最近 Live - 后续',
|
||||
description: 'Live 最新关注',
|
||||
title: '最新添加 - 后续',
|
||||
description: 'Live 最新添加',
|
||||
link: 'https://houxu.app/lives/new',
|
||||
item: out,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user