delete duplicate router
This commit is contained in:
parent
1f59667cb0
commit
9adee55fe2
|
|
@ -665,8 +665,8 @@ router.get('/kmust/job/careers/:type?', require('./routes/universities/kmust/job
|
|||
router.get('/kmust/job/jobfairs', require('./routes/universities/kmust/job/jobfairs'));
|
||||
|
||||
// 华中科技大学
|
||||
router.get('/hust/auto/notice/:type?', require('./routes/universities/hust/auto/notice'));
|
||||
router.get('/hust/auto/news/', require('./routes/universities/hust/auto/news'));
|
||||
router.get('/hust/auto/notice/:type?', require('./routes/universities/hust/aia/notice'));
|
||||
router.get('/hust/auto/news/', require('./routes/universities/hust/aia/news'));
|
||||
router.get('/hust/aia/news/', require('./routes/universities/hust/aia/news'));
|
||||
router.get('/hust/aia/notice/:type?', require('./routes/universities/hust/aia/notice'));
|
||||
|
||||
|
|
|
|||
|
|
@ -1,34 +0,0 @@
|
|||
const axios = require('../../../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const url = require('url').resolve;
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const link = 'http://aia.hust.edu.cn/yxxw.htm';
|
||||
const response = await axios.get(link);
|
||||
const $ = cheerio.load(response.data);
|
||||
const list = $('.N02_list li dl');
|
||||
|
||||
ctx.state.data = {
|
||||
title: '华科人工智能和自动化学院新闻',
|
||||
link: link,
|
||||
description: '华科人工智能和自动化学院新闻',
|
||||
item:
|
||||
list &&
|
||||
list
|
||||
.map((index, item) => {
|
||||
item = $(item);
|
||||
const day = item.find('.N02_list_Icon i').text();
|
||||
item.find('.N02_list_Icon')
|
||||
.find('i')
|
||||
.remove();
|
||||
const year_month = item.find('.N02_list_Icon').text();
|
||||
return {
|
||||
title: item.find('h4 a').text(),
|
||||
description: item.find('dd p').text() || '华科人工智能和自动化学院新闻',
|
||||
pubDate: new Date(year_month + ' ' + day).toUTCString(),
|
||||
link: url(link, item.find('h4 a').attr('href')),
|
||||
};
|
||||
})
|
||||
.get(),
|
||||
};
|
||||
};
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
const axios = require('../../../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const url = require('url').resolve;
|
||||
|
||||
const typelist = ['最新', '行政', '人事', '科研', '讲座', '本科生', '研究生', '学工'];
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const type = parseInt(ctx.params.type) || 0;
|
||||
const link = 'http://aia.hust.edu.cn/';
|
||||
const response = await axios.get(link);
|
||||
const $ = cheerio.load(response.data);
|
||||
const list = $('.m_content .m_con')
|
||||
.eq(type)
|
||||
.find('.N02_list_dl');
|
||||
|
||||
ctx.state.data = {
|
||||
title: `华科人工智能和自动化学院${typelist[type]}通知`,
|
||||
link: link,
|
||||
description: `华科人工智能和自动化学院${typelist[type]}通知`,
|
||||
item:
|
||||
list &&
|
||||
list
|
||||
.map((index, item) => {
|
||||
item = $(item);
|
||||
const day = item.find('.N02_list_Icon i').text();
|
||||
item.find('.N02_list_Icon')
|
||||
.find('i')
|
||||
.remove();
|
||||
const year_month = item.find('.N02_list_Icon').text();
|
||||
return {
|
||||
title: item.find('h4 a').text(),
|
||||
description: item.find('dd p').text() || `华科人工智能和自动化学院${typelist[type]}通知`,
|
||||
pubDate: new Date(year_month + ' ' + day).toUTCString(),
|
||||
link: url(link, item.find('h4 a').attr('href')),
|
||||
};
|
||||
})
|
||||
.get(),
|
||||
};
|
||||
};
|
||||
Loading…
Reference in New Issue