diff --git a/assets/radar-rules.js b/assets/radar-rules.js
index 60e4752d53..3b742aa91d 100644
--- a/assets/radar-rules.js
+++ b/assets/radar-rules.js
@@ -1934,6 +1934,20 @@
target: '/umass/amherst/csnews',
},
],
+ 'www': [
+ {
+ title: 'IPO Events',
+ docs: 'http://docs.rsshub.app/en/university.html#umass-amherst',
+ source: '/ipo/iss/events',
+ target: '/umass/amherst/ipoevents',
+ },
+ {
+ title: 'IPO Featured Stories',
+ docs: 'http://docs.rsshub.app/en/university.html#umass-amherst',
+ source: '/ipo/iss/featured-stories',
+ target: '/umass/amherst/ipostories',
+ },
+ ],
},
'lofter.com': {
_name: 'Lofter',
diff --git a/docs/en/university.md b/docs/en/university.md
index dbd45b04a6..99716dcebd 100644
--- a/docs/en/university.md
+++ b/docs/en/university.md
@@ -33,3 +33,13 @@ pageClass: routes
### College of Information & Computer Sciences News
+
+### International Programs Office
+
+#### Events
+
+
+
+#### Featured Stories
+
+
diff --git a/docs/university.md b/docs/university.md
index 4b2f55ed09..904e2ce063 100644
--- a/docs/university.md
+++ b/docs/university.md
@@ -847,6 +847,17 @@ jsjxy.hbut.edu.cn 证书链不全,自建 RSSHub 可设置环境变量 NODE_TLS
+### 国际项目办公室
+
+#### 活动
+
+
+
+#### 新闻
+
+
+
+
## 南昌航空大学
### 教务处公告与新闻
diff --git a/lib/router.js b/lib/router.js
index 672e8945e4..feb1b49b8b 100644
--- a/lib/router.js
+++ b/lib/router.js
@@ -2741,6 +2741,8 @@ router.get('/rf/article', require('./routes/rf/article'));
// University of Massachusetts Amherst
router.get('/umass/amherst/ecenews', require('./routes/umass/amherst/ecenews'));
router.get('/umass/amherst/csnews', require('./routes/umass/amherst/csnews'));
+router.get('/umass/amherst/ipoevents', require('./routes/umass/amherst/ipoevents'));
+router.get('/umass/amherst/ipostories', require('./routes/umass/amherst/ipostories'));
// 飘花电影网
router.get('/piaohua/hot', require('./routes/piaohua/hot'));
diff --git a/lib/routes/umass/amherst/csnews.js b/lib/routes/umass/amherst/csnews.js
index 51dd212299..4534ac0cc7 100644
--- a/lib/routes/umass/amherst/csnews.js
+++ b/lib/routes/umass/amherst/csnews.js
@@ -23,7 +23,7 @@ module.exports = async (ctx) => {
itemPicUrl = item.find('.views-field-field-image img').attr('src');
return {
title: item.find('.views-field-title a').first().text(),
- description: `
` + item.find('.views-field-body .field-content').first().text(),
+ description: `
` + item.find('.views-field-body .field-content').first(),
link: item.find('.views-more-link').attr('href'),
};
})
diff --git a/lib/routes/umass/amherst/ecenews.js b/lib/routes/umass/amherst/ecenews.js
index 8125b540c7..1c70551e00 100644
--- a/lib/routes/umass/amherst/ecenews.js
+++ b/lib/routes/umass/amherst/ecenews.js
@@ -24,7 +24,7 @@ module.exports = async (ctx) => {
itemPicUrl = item.find('.image-style-thumbnail').attr('src');
return {
title: item.find('.views-field-title a').first().text(),
- description: `
` + item.find('div.field-content').last().text(),
+ description: `
` + item.find('div.field-content').last(),
link: item.find('.views-field-title a').attr('href'),
};
})
diff --git a/lib/routes/umass/amherst/ipoevents.js b/lib/routes/umass/amherst/ipoevents.js
new file mode 100644
index 0000000000..e9dedab871
--- /dev/null
+++ b/lib/routes/umass/amherst/ipoevents.js
@@ -0,0 +1,42 @@
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+
+module.exports = async (ctx) => {
+ const response = await got({
+ method: 'get',
+ url: 'https://www.umass.edu/ipo/iss/events',
+ });
+
+ const data = response.data;
+
+ const $ = cheerio.load(data);
+ const list = $('.view-content .ed-abroad-events');
+ let itemPicUrl;
+
+ ctx.state.data = {
+ title: 'UMAmherst-IpoEvents',
+ link: 'https://www.umass.edu/ipo/iss/events',
+ item:
+ list &&
+ list
+ .map((index, item) => {
+ item = $(item);
+ eventDateTxt = item.find('.views-field-field-event-date .date-display-single').first();
+ eventStartDateTxt = item.find('.views-field-field-event-date .date-display-single .date-display-start').first().attr('content');
+
+ $.fn.ignore = function(sel) {
+ return this.clone().find(sel || ">*").remove().end();
+ };
+
+ descTxt = item.find('.views-field-body').first();
+
+ return {
+ title: item.find('.views-field-title a').first().text(),
+ description: eventDateTxt + '
' + descTxt,
+ link: item.find('.views-field-title a').attr('href'),
+ pubDate: new Date(Date.parse(eventStartDateTxt)).toUTCString()
+ };
+ })
+ .get(),
+ };
+};
diff --git a/lib/routes/umass/amherst/ipostories.js b/lib/routes/umass/amherst/ipostories.js
new file mode 100644
index 0000000000..1edcc27368
--- /dev/null
+++ b/lib/routes/umass/amherst/ipostories.js
@@ -0,0 +1,34 @@
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+
+module.exports = async (ctx) => {
+ const response = await got({
+ method: 'get',
+ url: 'https://www.umass.edu/ipo/iss/featured-stories',
+ });
+
+ const data = response.data;
+
+ const $ = cheerio.load(data);
+ const list = $('.view-content .individualNews');
+ let itemPicUrl;
+
+ ctx.state.data = {
+ title: 'UMAmherst-IpoStories',
+ link: 'https://www.umass.edu/ipo/iss/featured-stories',
+ item:
+ list &&
+ list
+ .map((index, item) => {
+ item = $(item);
+ itemPicUrl = item.find('.views-field-field-image img').attr('src');
+
+ return {
+ title: item.find('.views-field-title a').first().text(),
+ description: `
` + item.find('.views-field-field-news-body .field-content').first(),
+ link: item.find('.views-field-title a').attr('href')
+ };
+ })
+ .get(),
+ };
+};