mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-14 01:00:38 +08:00
fix: correct houxu/lives meta (#2837)
This commit is contained in:
@@ -575,9 +575,9 @@ type 为 all 时,category 参数不支持 cost 和 free
|
|||||||
|
|
||||||
<Route author="ciaranchen" example="/houxu/lives/new" path="/houxu/lives/:type" :paramsDesc="['类型']">
|
<Route author="ciaranchen" example="/houxu/lives/new" path="/houxu/lives/:type" :paramsDesc="['类型']">
|
||||||
|
|
||||||
| Live 实时(往事进展) | 最近 Live(最新关注) |
|
| 往事进展 | 最新添加 |
|
||||||
| --------------------- | --------------------- |
|
| -------- | -------- |
|
||||||
| realtime | new |
|
| realtime | new |
|
||||||
|
|
||||||
</Route>
|
</Route>
|
||||||
|
|
||||||
|
|||||||
@@ -2,21 +2,20 @@ const got = require('@/utils/got');
|
|||||||
|
|
||||||
const getLiveUrlById = (liveId) => `https://houxu.app/lives/${liveId}`;
|
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 realtimeHandler = async () => {
|
||||||
const res = await got.get('https://houxu.app/api/1/lives/updated/');
|
const res = await got.get('https://houxu.app/api/1/lives/updated/');
|
||||||
|
|
||||||
const out = res.data.results.map((el) => ({
|
const out = res.data.results.map((el) => ({
|
||||||
title: el.last.link.title,
|
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),
|
link: getLiveUrlById(el.id),
|
||||||
guid: 'realtime-' + el.id + '-' + el.last.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 {
|
return {
|
||||||
title: 'Live 实时 - 后续',
|
title: '往事进展 - 后续',
|
||||||
description: 'Live 往事进展',
|
description: 'Live 往事进展',
|
||||||
link: 'https://houxu.app/lives/realtime',
|
link: 'https://houxu.app/lives/realtime',
|
||||||
item: out,
|
item: out,
|
||||||
@@ -30,13 +29,13 @@ const newHandler = async () => {
|
|||||||
.map((el) => ({
|
.map((el) => ({
|
||||||
title: el.object.title,
|
title: el.object.title,
|
||||||
description: el.object.summary,
|
description: el.object.summary,
|
||||||
link: getLiveUrlById(el.id),
|
link: getLiveUrlById(el.object.id),
|
||||||
guid: 'new-' + el.id + '-' + el.object.id,
|
guid: 'new-' + el.object.id,
|
||||||
pubDate: new Date(el.object.create_at).toUTCString(),
|
pubDate: new Date(el.publish_at).toUTCString(),
|
||||||
}));
|
}));
|
||||||
return {
|
return {
|
||||||
title: '最近 Live - 后续',
|
title: '最新添加 - 后续',
|
||||||
description: 'Live 最新关注',
|
description: 'Live 最新添加',
|
||||||
link: 'https://houxu.app/lives/new',
|
link: 'https://houxu.app/lives/new',
|
||||||
item: out,
|
item: out,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user