mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-07 13:39:35 +08:00
feat: add 小米应用商店金米奖 (#4916)
This commit is contained in:
@@ -265,3 +265,9 @@ pageClass: routes
|
||||
### 更新日志
|
||||
|
||||
<Route author="cielpy" example="/qcloud/mlvb/changelog" path="/qcloud/mlvb/changelog"/>
|
||||
|
||||
## 小米应用商店
|
||||
|
||||
### 金米奖
|
||||
|
||||
<Route author="nczitzk" example="/mi/golden" path="/mi/golden"/>
|
||||
|
||||
@@ -390,6 +390,7 @@ router.get('/hexo/yilia/:url', require('./routes/hexo/yilia'));
|
||||
router.get('/cpython/:pre?', require('./routes/cpython'));
|
||||
|
||||
// 小米
|
||||
router.get('/mi/golden', require('./routes/mi/golden'));
|
||||
router.get('/mi/crowdfunding', require('./routes/mi/crowdfunding'));
|
||||
router.get('/mi/youpin/crowdfunding', require('./routes/mi/youpin/crowdfunding'));
|
||||
router.get('/mi/youpin/new', require('./routes/mi/youpin/new'));
|
||||
|
||||
22
lib/routes/mi/golden.js
Normal file
22
lib/routes/mi/golden.js
Normal file
@@ -0,0 +1,22 @@
|
||||
const got = require('@/utils/got');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const link = 'https://app.market.xiaomi.com/apm/subject/169449?os=1.1.1&sdk=19';
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: link,
|
||||
});
|
||||
|
||||
const list = response.data.listApp.map((item) => ({
|
||||
title: `第${item.subjectGroup.split('期')[0].replace('第', '')}期 ${item.displayName} [${item.level1CategoryName} - ${item.level2CategoryName}]`,
|
||||
link: `http://app.mi.com/details?id=${item.packageName}`,
|
||||
description: item.briefShow,
|
||||
}));
|
||||
|
||||
ctx.state.data = {
|
||||
title: `金米奖 - 小米应用商店`,
|
||||
link: link,
|
||||
item: list,
|
||||
description: `${response.data.description}`,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user