feat(route): 添加重庆人社局事业单位招聘公告 (#13331)
* feature: 添加重庆市事业单位公开招聘 * Update website/docs/routes/government.md upadte wrong routes in md file ---------
This commit is contained in:
parent
a0f12f26d8
commit
3a2eec2bd4
|
|
@ -0,0 +1,47 @@
|
|||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
const { parseDate } = require('@/utils/parse-date');
|
||||
|
||||
// 重庆市事业单位公开招聘
|
||||
const sydwgkzpUrl = 'https://rlsbj.cq.gov.cn/zwxx_182/sydw/';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const { data: response } = await got(sydwgkzpUrl);
|
||||
|
||||
const $ = cheerio.load(response);
|
||||
|
||||
// 获取所有的标题
|
||||
const list = $('div.page-list .tab-item > li')
|
||||
.toArray()
|
||||
.map((item) => {
|
||||
item = $(item);
|
||||
const title = item.find('a').first();
|
||||
return {
|
||||
// 文章标题
|
||||
title: title.text(),
|
||||
// 文章链接
|
||||
link: `${sydwgkzpUrl}${title.attr('href')}`,
|
||||
// 文章发布日期
|
||||
pubDate: parseDate(item.find('span').text()),
|
||||
};
|
||||
});
|
||||
|
||||
// 获取每个通知的具体信息
|
||||
const items = await Promise.all(
|
||||
list.map((item) =>
|
||||
ctx.cache.tryGet(item.link, async () => {
|
||||
const { data: response } = await got(item.link);
|
||||
const $ = cheerio.load(response);
|
||||
// 主题正文
|
||||
item.description = $('div[class="view TRS_UEDITOR trs_paper_default trs_web"]').first().html();
|
||||
return item;
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
ctx.state.data = {
|
||||
title: '重庆市事业单位公开招聘',
|
||||
link: sydwgkzpUrl,
|
||||
item: items,
|
||||
};
|
||||
};
|
||||
|
|
@ -54,6 +54,7 @@ module.exports = {
|
|||
'/beijing/jw/tzgg': ['nczitzk'],
|
||||
'/beijing/kw/:channel': ['Fatpandac'],
|
||||
'/chongqing/rsks': ['Mai19930513'],
|
||||
'/chongqing/sydwgkzp': ['MajexH'],
|
||||
'/dianbai/:path+': ['ShuiHuo'],
|
||||
'/gaozhou/:path+': ['ShuiHuo'],
|
||||
'/guangdong/tqyb/sncsyjxh': ['Fatpandac'],
|
||||
|
|
|
|||
|
|
@ -437,6 +437,12 @@ module.exports = {
|
|||
source: ['/'],
|
||||
target: '/gov/chongqing/rsks',
|
||||
},
|
||||
{
|
||||
title: '重庆事业单位公开招聘',
|
||||
docs: 'https://docs.rsshub.app/routes/government#chong-qing-shi-ren-min-zheng-fu',
|
||||
source: ['/'],
|
||||
target: '/gov/chongqing/sydwgkzp',
|
||||
},
|
||||
],
|
||||
},
|
||||
'csrc.gov.cn': {
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ module.exports = function (router) {
|
|||
router.get('/beijing/jw/tzgg', require('./beijing/jw/tzgg'));
|
||||
router.get('/beijing/kw/:channel', require('./beijing/kw/index'));
|
||||
router.get('/chongqing/rsks', require('./chongqing/rsks'));
|
||||
router.get('/chongqing/sydwgkzp', require('./chongqing/sydwgkzp'));
|
||||
router.get(/dianbai(\/[\w/-]+)?/, require('./dianbai/dianbai'));
|
||||
router.get(/gaozhou(\/[\w/-]+)?/, require('./gaozhou/gaozhou'));
|
||||
router.get('/guangdong/tqyb/sncsyjxh', require('./guangdong/tqyb/sncsyjxh'));
|
||||
|
|
|
|||
|
|
@ -327,6 +327,10 @@ Language
|
|||
|
||||
<Route author="Mai19930513" example="/gov/chongqing/rsks" path="/gov/chongqing/rsks" radar="1"/>
|
||||
|
||||
#### 事业单位公开招聘 {#chong-qing-shi-ren-min-zheng-fu-ren-li-she-bao-ju-shi-ye-dan-wei-gong-kai-zhao-pin}
|
||||
|
||||
<Route author="MajexH" example="/gov/chongqing/sydwgkzp" path="/gov/chongqing/sydwgkzp" radar="1"/>
|
||||
|
||||
## 德阳市人民政府 {#de-yang-shi-ren-min-zheng-fu}
|
||||
|
||||
### 政府公开信息 {#de-yang-shi-ren-min-zheng-fu-zheng-fu-gong-kai-xin-xi}
|
||||
|
|
|
|||
Loading…
Reference in New Issue