mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-09 06:30:40 +08:00
feat: add monsterhunter update
This commit is contained in:
@@ -109,6 +109,12 @@ Example: `https://store.steampowered.com/search/?specials=1&term=atelier` 中的
|
||||
|
||||
<Route author="whtsky" example="/steamgifts/discussions" path="/steamgifts/discussions/:category?" :paramsDesc="['分类名称,默认为All']"/>
|
||||
|
||||
## 怪物猎人
|
||||
|
||||
### 更新
|
||||
|
||||
<Route author="DIYgod" example="/monsterhunter/update" path="/monsterhunter/update"/>
|
||||
|
||||
## 旅法师营地
|
||||
|
||||
### 旅法师营地
|
||||
|
||||
@@ -140,6 +140,12 @@ pageClass: routes
|
||||
|
||||
<Route author="maple3142" example="/xiaomieu/releases" path="/xiaomieu/releases"/>
|
||||
|
||||
## 怪物猎人
|
||||
|
||||
### 更新
|
||||
|
||||
见 [#怪物猎人](/game.html#怪物猎人)
|
||||
|
||||
## 腾讯云移动直播 SDK
|
||||
|
||||
### 更新日志
|
||||
|
||||
@@ -1382,4 +1382,7 @@ router.get('/dilbert/strip', require('./routes/dilbert/strip'));
|
||||
// 游戏打折情报
|
||||
router.get('/yxdzqb/:type', require('./routes/yxdzqb'));
|
||||
|
||||
// 怪物猎人
|
||||
router.get('/monsterhunter/update', require('./routes/monsterhunter/update'));
|
||||
|
||||
module.exports = router;
|
||||
|
||||
34
lib/routes/monsterhunter/update.js
Normal file
34
lib/routes/monsterhunter/update.js
Normal file
@@ -0,0 +1,34 @@
|
||||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const url = 'http://game.capcom.com/world/cn/infomation.html';
|
||||
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url,
|
||||
});
|
||||
|
||||
const data = response.data;
|
||||
|
||||
const $ = cheerio.load(data);
|
||||
const list = $('.version');
|
||||
|
||||
ctx.state.data = {
|
||||
title: '怪物猎人更新情报',
|
||||
link: url,
|
||||
item:
|
||||
list &&
|
||||
list
|
||||
.map((index, item) => {
|
||||
item = $(item);
|
||||
return {
|
||||
title: item.find('h3').text(),
|
||||
description: item.children('div').html(),
|
||||
link: url,
|
||||
guid: item.find('h3').text(),
|
||||
};
|
||||
})
|
||||
.get(),
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user