mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-08 05:59:00 +08:00
feat: 新增前端艺术家每日资讯&飞冰早报 (#2903)
This commit is contained in:
@@ -499,6 +499,18 @@ GitHub 官方也提供了一些 RSS:
|
||||
|
||||
</Route>
|
||||
|
||||
## 前端艺术家&&飞冰早报
|
||||
|
||||
### 列表
|
||||
|
||||
<Route author="kouchao" example="/jskou/0" path="/jskou/:type?" :paramsDesc="['分类']">
|
||||
|
||||
| 前端艺术家 | 飞冰早报 |
|
||||
| ---------- | -------- |
|
||||
| 0 | 1 |
|
||||
|
||||
</Route>
|
||||
|
||||
## 顺丰
|
||||
|
||||
### 顺丰丰桥开放平台公告
|
||||
|
||||
@@ -1637,4 +1637,7 @@ router.get('/latexstudio/home', require('./routes/latexstudio/home'));
|
||||
// 上证债券信息网 - 可转换公司债券公告
|
||||
router.get('/sse/convert/:query?', require('./routes/sse/convert'));
|
||||
|
||||
// 前端艺术家每日整理&&飞冰早报
|
||||
router.get('/jskou/:type?', require('./routes/jskou/index'));
|
||||
|
||||
module.exports = router;
|
||||
|
||||
21
lib/routes/jskou/index.js
Normal file
21
lib/routes/jskou/index.js
Normal file
@@ -0,0 +1,21 @@
|
||||
const got = require('@/utils/got');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const type = ctx.params.type;
|
||||
const response = await got(`http://jskou.com:3003/contents/list?type=${type || 0}&page=0&pageSize=30`);
|
||||
const item = response.data.data.map((item) => {
|
||||
const tag = item.tag ? `[${item.tag}]` : '';
|
||||
return {
|
||||
title: item.title,
|
||||
description: `${tag} ${item.title}`,
|
||||
pubDate: item.time,
|
||||
link: item.link,
|
||||
};
|
||||
});
|
||||
ctx.state.data = {
|
||||
title: type ? '前端艺术家每日资讯整理' : '飞冰早报整理',
|
||||
link: 'http://fe.jskou.com/',
|
||||
description: '前端艺术家1群每日资讯,飞冰早报',
|
||||
item,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user