mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-08 14:07:54 +08:00
feat: add 吹牛部落专栏列表 (#4134)
This commit is contained in:
@@ -64,6 +64,10 @@ pageClass: routes
|
||||
:::
|
||||
</Route>
|
||||
|
||||
### 专栏列表
|
||||
|
||||
<Route author="LogicJake" example="/chuiniu/column_list" path="/chuiniu/column_list"/>
|
||||
|
||||
## 刺猬猫
|
||||
|
||||
### 章节
|
||||
|
||||
@@ -1907,6 +1907,7 @@ router.get('/engadget/:lang', require('./routes/engadget/home'));
|
||||
|
||||
// 吹牛部落
|
||||
router.get('/chuiniu/column/:id', require('./routes/chuiniu/column'));
|
||||
router.get('/chuiniu/column_list', require('./routes/chuiniu/column_list'));
|
||||
|
||||
// leemeng
|
||||
router.get('/leemeng', require('./routes/blogs/leemeng'));
|
||||
|
||||
36
lib/routes/chuiniu/column_list.js
Normal file
36
lib/routes/chuiniu/column_list.js
Normal file
@@ -0,0 +1,36 @@
|
||||
const got = require('@/utils/got');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const url = 'http://chuiniu.duanshu.com/#/list/column';
|
||||
|
||||
let response = await got({
|
||||
method: 'get',
|
||||
url: 'http://api.duanshu.com/fairy/api/v1/shop/identifier/',
|
||||
headers: {
|
||||
Origin: url,
|
||||
Referer: url,
|
||||
},
|
||||
});
|
||||
const shop_id = response.data.shop_id;
|
||||
|
||||
response = await got({
|
||||
method: 'get',
|
||||
url: `http://api.duanshu.com/h5/content/column/lists?page=1&count=12&shop_id=${shop_id}`,
|
||||
headers: {
|
||||
Referer: url,
|
||||
},
|
||||
});
|
||||
const list = response.data.response.data;
|
||||
|
||||
const out = list.map((item) => ({
|
||||
link: `http://chuiniu.duanshu.com/#/brief/column/${item.column_id}`,
|
||||
title: item.title,
|
||||
description: item.brief,
|
||||
}));
|
||||
|
||||
ctx.state.data = {
|
||||
title: '吹牛部落专栏列表',
|
||||
link: url,
|
||||
item: out,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user