mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-08 22:19:40 +08:00
feat: add 白鲸出海 (#3743)
This commit is contained in:
@@ -956,4 +956,15 @@
|
||||
},
|
||||
],
|
||||
},
|
||||
'baijingapp.com': {
|
||||
_name: '白鲸出海',
|
||||
www: [
|
||||
{
|
||||
title: '文章',
|
||||
docs: 'https://docs.rsshub.app/new-media.html#bai-jing-chu-hai',
|
||||
source: '',
|
||||
target: '/baijing',
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
@@ -255,6 +255,12 @@ Supported sub-sites:
|
||||
|
||||
<Route author="hillerliao" example="/8btc/news/flash" path="/8btc/news/flash"/>
|
||||
|
||||
## 白鲸出海
|
||||
|
||||
### 首页最新帖子
|
||||
|
||||
<Route author="jeffcottLu" example="/baijing" path="/baijing"></Route>
|
||||
|
||||
## 坂道系列官网新闻
|
||||
|
||||
### 乃木坂 46
|
||||
|
||||
@@ -2098,6 +2098,9 @@ router.get('/mlog-club/projects', require('./routes/mlog-club/projects'));
|
||||
// Chrome 网上应用店
|
||||
router.get('/chrome/webstore/extensions/:id', require('./routes/chrome/extensions'));
|
||||
|
||||
// 白鲸出海
|
||||
router.get('/baijing', require('./routes/baijing'));
|
||||
|
||||
// 低端影视
|
||||
router.get('/ddrk/:name/:season?', require('./routes/ddrk/index'));
|
||||
|
||||
|
||||
44
lib/routes/baijing/index.js
Normal file
44
lib/routes/baijing/index.js
Normal file
@@ -0,0 +1,44 @@
|
||||
const got = require('@/utils/got');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await got({
|
||||
method: 'post',
|
||||
url: 'http://www.baijingapp.com/api/get_more_articles/',
|
||||
form: true,
|
||||
responseType: 'json',
|
||||
body: {
|
||||
deviceid: 'ios',
|
||||
page: 1,
|
||||
},
|
||||
});
|
||||
|
||||
const resList = response.data;
|
||||
|
||||
// json字符串转json对象
|
||||
const resListObj = new Function('return ' + resList)();
|
||||
|
||||
if (resListObj.state === 1) {
|
||||
const output = resListObj.data.list.map((item) => {
|
||||
const title = item.title;
|
||||
const link = 'https://www.baijingapp.com/article/' + item.id;
|
||||
const time = item.time;
|
||||
const author = item.user_name;
|
||||
const image = item.image;
|
||||
const single = {
|
||||
title,
|
||||
link,
|
||||
time,
|
||||
author,
|
||||
image,
|
||||
};
|
||||
|
||||
return single;
|
||||
});
|
||||
|
||||
ctx.state.data = {
|
||||
title: `白鲸出海`,
|
||||
desription: '白鲸出海 - 泛互联网出海服务平台',
|
||||
item: output,
|
||||
};
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user