feat: add HNU careers feed (#12405)
* feat: hnu careers init * docs: update hnu careers * feat: update format information * style: format code * feat: add docs * fix: radar * fix: radar url * feat: rm mock * docs: add API note * fix: link to careers page * fix: link to career page * style: validate
This commit is contained in:
parent
1d7f3bfe04
commit
98cfccb65d
|
|
@ -1424,6 +1424,12 @@ category 列表:
|
|||
jsjxy.hbut.edu.cn 证书链不全,自建 RSSHub 可设置环境变量 NODE_TLS_REJECT_UNAUTHORIZED = 0
|
||||
:::
|
||||
|
||||
## 湖南大学
|
||||
|
||||
### 校园招聘
|
||||
|
||||
<Route author="ningyougan" example="/hnu/careers" path="/hnu/careers"/>
|
||||
|
||||
## 湖南科技大学
|
||||
|
||||
### 教务处通知
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
const got = require('@/utils/got');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const rootUrl = 'http://scc.hnu.edu.cn/';
|
||||
// 校园招聘的路由为/module/getcareers,但该页面默认仅加载整体框架,具体的招聘信息在页面加载完成后再交易获取。
|
||||
// 具体的交易可以通过f12,网络栏进行查看,项目中仅保留了必须携带的参数。
|
||||
// 其中有用的参数为count,为获取招聘信息的数量。
|
||||
const currentRoute = `${rootUrl}module/getcareers`;
|
||||
const currentUrl = `${currentRoute}?start_page=1&type=inner&day=&count=20&start=1`;
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: currentUrl,
|
||||
});
|
||||
const company_list = response.data.data;
|
||||
|
||||
ctx.state.data = {
|
||||
title: '校园招聘',
|
||||
link: currentRoute,
|
||||
item: company_list.map((company_info) => {
|
||||
const ret = {
|
||||
// 标题:公司名称
|
||||
title: company_info.company_name,
|
||||
// 链接:公司招聘简章链接
|
||||
link: `${rootUrl}detail/career?id=${company_info.career_talk_id}`,
|
||||
// 描述:校招教室+时间+专业
|
||||
description: company_info.address + ' - ' + company_info.meet_time + ' - ' + company_info.professionals,
|
||||
// 分类:公司类型(私营、国企)+ 工作城市
|
||||
category: company_info.company_property + ' - ' + company_info.city_name,
|
||||
};
|
||||
return ret;
|
||||
}),
|
||||
};
|
||||
};
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = {
|
||||
'/careers': ['ningyougan'],
|
||||
};
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
module.exports = {
|
||||
'hnu.edu.cn': {
|
||||
_name: '湖南大学',
|
||||
scc: [
|
||||
{
|
||||
title: '校园招聘',
|
||||
docs: 'https://docs.rsshub.app/university.html#hu-nan-da-xue',
|
||||
target: '/hnu/careers',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = function (router) {
|
||||
router.get('/careers', require('./careers'));
|
||||
};
|
||||
Loading…
Reference in New Issue