mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-06 05:03:44 +08:00
@@ -2819,3 +2819,7 @@ board 和 build 可在[这里](http://api.ineal.me/tss/status)查看
|
||||
### 创业邦
|
||||
|
||||
<route name="作者" author="xyqfer" example="/cyzone/author/1225562" path="/cyzone/author/:id" :paramsDesc="['作者 id']"/>
|
||||
|
||||
### 政府
|
||||
|
||||
<route name="最新政策" author="SettingDust" example="/gov/zhengce/zuixin" path="/gov/zhengce/zuixin"/>
|
||||
|
||||
@@ -1001,6 +1001,9 @@ router.get('/duozhuayu/search/:wd', require('./routes/duozhuayu/search'));
|
||||
// 创业邦
|
||||
router.get('/cyzone/author/:id', require('./routes/cyzone/author'));
|
||||
|
||||
// 政府
|
||||
router.get('/gov/zhengce/zuixin', require('./routes/gov/zhengce/zuixin'));
|
||||
|
||||
// 小黑盒
|
||||
router.get('/xiaoheihe/user/:id', require('./routes/xiaoheihe/user'));
|
||||
|
||||
|
||||
24
lib/routes/gov/zhengce/zuixin.js
Normal file
24
lib/routes/gov/zhengce/zuixin.js
Normal file
@@ -0,0 +1,24 @@
|
||||
const axios = require('../../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const link = `http://www.gov.cn/zhengce/zuixin.htm`;
|
||||
const response = await axios.get(link);
|
||||
const $ = cheerio.load(response.data);
|
||||
ctx.state.data = {
|
||||
title: `最新政策 - 中国政府网`,
|
||||
link,
|
||||
item: $('.news_box .list li:not(.line)')
|
||||
.map((i, el) => {
|
||||
const $el = $(el);
|
||||
const $a = $el.find('h4 a');
|
||||
return {
|
||||
title: $a.text(),
|
||||
description: $a.text(),
|
||||
link: $a.attr('href'),
|
||||
pubDate: new Date($el.find('.date').text()).toUTCString(),
|
||||
};
|
||||
})
|
||||
.get(),
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user