mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-09 23:00:48 +08:00
@@ -50,6 +50,11 @@ The parameter id in the route is the id in the URL of the user ’s Google Schol
|
|||||||
|
|
||||||
<RouteEn author="liecn" example="/gradcafe/result/computer" path="/gradcafe/result/:type" :paramsDesc="['Keyword']"/>
|
<RouteEn author="liecn" example="/gradcafe/result/computer" path="/gradcafe/result/:type" :paramsDesc="['Keyword']"/>
|
||||||
|
|
||||||
|
## Great Britain China Centre
|
||||||
|
|
||||||
|
### Educational Trust
|
||||||
|
|
||||||
|
<RouteEn author="HenryQW" example="/gbcc/trust" path="/gbcc/trust" />
|
||||||
## Nature
|
## Nature
|
||||||
|
|
||||||
### Nature
|
### Nature
|
||||||
|
|||||||
@@ -167,6 +167,12 @@ pageClass: routes
|
|||||||
|
|
||||||
</Route>
|
</Route>
|
||||||
|
|
||||||
|
## 英中协会
|
||||||
|
|
||||||
|
### 奖学金
|
||||||
|
|
||||||
|
<Route author="HenryQW" example="/gbcc/trust" path="/gbcc/trust" />
|
||||||
|
|
||||||
## 语雀
|
## 语雀
|
||||||
|
|
||||||
### 知识库
|
### 知识库
|
||||||
|
|||||||
@@ -2098,6 +2098,9 @@ router.get('/mlog-club/projects', require('./routes/mlog-club/projects'));
|
|||||||
// Chrome 网上应用店
|
// Chrome 网上应用店
|
||||||
router.get('/chrome/webstore/extensions/:id', require('./routes/chrome/extensions'));
|
router.get('/chrome/webstore/extensions/:id', require('./routes/chrome/extensions'));
|
||||||
|
|
||||||
|
// 英中协会
|
||||||
|
router.get('/gbcc/trust', require('./routes/gbcc/trust'));
|
||||||
|
|
||||||
// Associated Press
|
// Associated Press
|
||||||
router.get('/apnews/topics/:topic', require('./routes/apnews/topics'));
|
router.get('/apnews/topics/:topic', require('./routes/apnews/topics'));
|
||||||
|
|
||||||
|
|||||||
28
lib/routes/gbcc/trust.js
Normal file
28
lib/routes/gbcc/trust.js
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
const got = require('@/utils/got');
|
||||||
|
const cheerio = require('cheerio');
|
||||||
|
|
||||||
|
module.exports = async (ctx) => {
|
||||||
|
const link = 'http://www.gbcc.org.uk/educational-grants';
|
||||||
|
const response = (await got.get(link)).data;
|
||||||
|
|
||||||
|
const $ = cheerio.load(response);
|
||||||
|
|
||||||
|
const items = $('.entry-anchorLinkId')
|
||||||
|
.next('.entry-text')
|
||||||
|
.map((i, e) => ({
|
||||||
|
title: $(e)
|
||||||
|
.find('h1')
|
||||||
|
.html(),
|
||||||
|
link,
|
||||||
|
description: $(e).html(),
|
||||||
|
pubDate: new Date().toUTCString(),
|
||||||
|
}))
|
||||||
|
.get();
|
||||||
|
|
||||||
|
ctx.state.data = {
|
||||||
|
title: '英中协会 - 奖学金',
|
||||||
|
description: '英中协会是由英国外交和联邦事务部于 1974 年创立的非政府部门公共机构。',
|
||||||
|
link,
|
||||||
|
item: items,
|
||||||
|
};
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user