mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
feat: add xyplorer what's new (#6334)
This commit is contained in:
@@ -232,3 +232,9 @@ Refer to [#minecraft](/en/game.html#minecraft)
|
||||
### Module Update
|
||||
|
||||
<RouteEn author="nczitzk" example="/xposed/module/com.ext.star.wars" path="/xposed/module/:mod" :paramsDesc="['module package name']"/>
|
||||
|
||||
## XYplorer
|
||||
|
||||
### What's New
|
||||
|
||||
<RouteEn author="nczitzk" example="/xyplorer/whatsnew" path="/xyplorer/whatsnew"/>
|
||||
@@ -312,6 +312,12 @@ pageClass: routes
|
||||
|
||||
<Route author="nczitzk" example="/xposed/module/com.ext.star.wars" path="/xposed/module/:mod" :paramsDesc="['模块包名, 模块页中的 Package 字段']"/>
|
||||
|
||||
## XYplorer
|
||||
|
||||
### What's New
|
||||
|
||||
<Route author="nczitzk" example="/xyplorer/whatsnew" path="/xyplorer/whatsnew"/>
|
||||
|
||||
## 怪物猎人世界
|
||||
|
||||
### 更新
|
||||
|
||||
@@ -3517,6 +3517,9 @@ router.get('/uisdc/news', require('./routes/uisdc/news'));
|
||||
router.get('/uisdc/zt/:title?', require('./routes/uisdc/zt'));
|
||||
router.get('/uisdc/topic/:title?/:sort?', require('./routes/uisdc/topic'));
|
||||
|
||||
// XYplorer
|
||||
router.get('/xyplorer/whatsnew', require('./routes/xyplorer/whatsnew'));
|
||||
|
||||
// RescueTime
|
||||
router.get('/rescuetime/release-notes/:os?', require('./routes/rescuetime/release-notes'));
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
const date = require('@/utils/date');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const rootUrl = 'https://www.xyplorer.com';
|
||||
const currentUrl = `${rootUrl}/whatsnew.php`;
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: currentUrl,
|
||||
});
|
||||
|
||||
const $ = cheerio.load(response.data);
|
||||
|
||||
const items = $('.waznu')
|
||||
.map((_, item) => {
|
||||
item = $(item);
|
||||
return {
|
||||
link: currentUrl,
|
||||
description: item.html(),
|
||||
title: item.prev().prev().text(),
|
||||
pubDate: date(item.prev().text().replace('released ', '')),
|
||||
};
|
||||
})
|
||||
.get();
|
||||
|
||||
ctx.state.data = {
|
||||
title: $('title').text(),
|
||||
link: currentUrl,
|
||||
item: items,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user