feat(route): asus gpu tweak (#10293)

* feat(route): asus gpu tweak

* fix: typo
This commit is contained in:
Tony
2022-07-22 04:19:21 +08:00
committed by GitHub
parent d43e194684
commit 7d10eac6d1
6 changed files with 59 additions and 1 deletions
+10
View File
@@ -62,6 +62,16 @@ The parameters can be extracted from the Release page URL: `https://install.appc
<RouteEn author="HenryQW" example="/aptonic/action" path="/aptonic/action/:untested?" :paramsDesc="['Set any value to include untested actions.']"/>
## ASUS
### BIOS
<RouteEn author="Fatpandac" example="/asus/bios/RT-AX88U" path="/asus/bios/:model" :paramsDesc="['Model, can be found in product page']"/>
### GPU Tweak
<RouteEn author="TonyRL" example="/asus/gpu-tweak" path="/asus/gpu-tweak" radar="1" rssbud="1"/>
## Bandisoft
### History
+4
View File
@@ -577,6 +577,10 @@ pageClass: routes
<Route author="Fatpandac" example="/asus/bios/RT-AX88U" path="/asus/bios/:model" :paramsDesc="['产品型号,可在产品页面找到']"/>
### GPU Tweak
<Route author="TonyRL" example="/asus/gpu-tweak" path="/asus/gpu-tweak" radar="1" rssbud="1"/>
## 蒲公英应用分发
### app 更新
+31
View File
@@ -0,0 +1,31 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
const { parseDate } = require('@/utils/parse-date');
const pageUrl = 'https://www.asus.com/campaign/GPU-Tweak-III/tw/index.php';
module.exports = async (ctx) => {
const response = await got(pageUrl);
const $ = cheerio.load(response.data);
const items = $('section div.inner div.item')
.toArray()
.map((item) => {
item = $(item);
item.find('.last').remove();
return {
title: item.find('.ver h6').text().trim(),
description: item.find('.btnbox a.open_patch_lightbox').attr('data-info'),
pubDate: parseDate(item.find('.ti').text()),
link: item.find('.btnbox a[download=]').attr('href'),
};
});
ctx.state.data = {
title: $('head title').text(),
description: $('meta[name=description]').attr('content'),
image: new URL($('head link[rel="shortcut icon"]').attr('href'), pageUrl).href,
link: pageUrl,
item: items,
language: $('html').attr('lang'),
};
};
+1
View File
@@ -1,3 +1,4 @@
module.exports = {
'/bios/:model': ['Fatpandac'],
'/gpu-tweak': ['TonyRL'],
};
+12 -1
View File
@@ -6,7 +6,18 @@ module.exports = {
title: '固件',
docs: 'https://docs.rsshub.app/program-update.html#hua-shuo',
source: ['/'],
target: '/bios/:model',
target: '/asus/bios/:model',
},
],
},
'asus.com': {
_name: 'ASUS',
'.': [
{
title: 'GPU Tweak',
docs: 'https://docs.rsshub.app/program-update.html#hua-shuo',
source: ['/campaign/GPU-Tweak-III/*', '/'],
target: '/asus/gpu-tweak',
},
],
},
+1
View File
@@ -1,3 +1,4 @@
module.exports = function (router) {
router.get('/bios/:model', require('./bios'));
router.get('/gpu-tweak', require('./gpu-tweak'));
};