mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
@@ -2113,3 +2113,7 @@ QueryString:
|
||||
### 全文
|
||||
|
||||
<Route author="HenryQW" example="/zzz" path="/zzz/index"/>
|
||||
|
||||
## 鱼塘热榜
|
||||
|
||||
<Route author="TheresaQWQ" example="/mofish/2" path="/mofish/:id" :paramsDesc="['分类id,可以在 https://api.tophub.fun/GetAllType 获取']" />
|
||||
@@ -3786,6 +3786,9 @@ router.get('/nace/blog/:sort?', require('./routes/nace/blog'));
|
||||
// Caixin Latest
|
||||
router.get('/caixin/latest', require('./routes/caixin/latest'));
|
||||
|
||||
// 鱼塘热榜
|
||||
router.get('/mofish/:id', require('./routes/mofish/index'));
|
||||
|
||||
// Mcdonalds
|
||||
router.get('/mcdonalds/:category', require('./routes/mcdonalds/news'));
|
||||
|
||||
@@ -3814,4 +3817,5 @@ router.get('/simpread/changelog', require('./routes/simpread/changelog'));
|
||||
// Radio Free Asia
|
||||
router.get('/rfa/:language?/:channel?/:subChannel?', require('./routes/rfa/index'));
|
||||
|
||||
|
||||
module.exports = router;
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
const got = require('@/utils/got');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.params.id;
|
||||
const page = ctx.query.page || 0;
|
||||
|
||||
const url = `https://api.tophub.fun/v2/GetAllInfoGzip?id=${id}&page=${page}`;
|
||||
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: url,
|
||||
});
|
||||
|
||||
const data = response.data.Data.data;
|
||||
|
||||
const title = `鱼塘热榜`;
|
||||
|
||||
ctx.state.data = {
|
||||
title: title,
|
||||
link: `https://mo.fish/`,
|
||||
description: title,
|
||||
item: data.map((item) => ({
|
||||
title: item.Title,
|
||||
pubDate: new Date(item.releaseTime).toUTCString(),
|
||||
link: item.Url,
|
||||
guid: item.id,
|
||||
})),
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user