mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-08 22:19:40 +08:00
feat: add route for wolley.io (#4023)
This commit is contained in:
@@ -306,6 +306,10 @@ GitHub 官方也提供了一些 RSS:
|
|||||||
|
|
||||||
</Route>
|
</Route>
|
||||||
|
|
||||||
|
## wolley
|
||||||
|
|
||||||
|
<Route author="umm233" example="/wolley" path="/wolley/index"/>
|
||||||
|
|
||||||
## 阿里云
|
## 阿里云
|
||||||
|
|
||||||
### 数据库内核月报
|
### 数据库内核月报
|
||||||
|
|||||||
@@ -2262,4 +2262,7 @@ router.get('/neu/news/:type', require('./routes/universities/neu/news'));
|
|||||||
// 稻草人书屋
|
// 稻草人书屋
|
||||||
router.get('/dcrsw/:name/:count?', require('./routes/novel/dcrsw'));
|
router.get('/dcrsw/:name/:count?', require('./routes/novel/dcrsw'));
|
||||||
|
|
||||||
|
// wolley
|
||||||
|
router.get('/wolley', require('./routes/wolley/index'));
|
||||||
|
|
||||||
module.exports = router;
|
module.exports = router;
|
||||||
|
|||||||
28
lib/routes/wolley/index.js
Normal file
28
lib/routes/wolley/index.js
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
const got = require('@/utils/got');
|
||||||
|
|
||||||
|
module.exports = async (ctx) => {
|
||||||
|
const link = 'https://wolley.io/';
|
||||||
|
|
||||||
|
const response = await got({
|
||||||
|
method: 'get',
|
||||||
|
url: `https://wolley.io/api/submissions/list?page=1&limit=30`,
|
||||||
|
headers: {
|
||||||
|
Referer: link,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const data = response.data.data;
|
||||||
|
|
||||||
|
ctx.state.data = {
|
||||||
|
title: `wolley`,
|
||||||
|
link,
|
||||||
|
description: '',
|
||||||
|
|
||||||
|
item: data.map((item) => ({
|
||||||
|
title: item.title,
|
||||||
|
description: `post by <a href=https://wolley.io/user/${item.user.handler}>${item.user.handler}</a>`,
|
||||||
|
pubDate: item.createdAt,
|
||||||
|
link: item.url,
|
||||||
|
})),
|
||||||
|
};
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user