mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
feat(route): ifi-audio download hub (#10337)
* feat(route): ifi-audio download hub * fix(ifi-audio): use cheerio to make guid distinct
This commit is contained in:
+63
-49
@@ -86,29 +86,29 @@ Software id
|
||||
|
||||
Language
|
||||
|
||||
| Language | key |
|
||||
| -------- | --- |
|
||||
| English | en |
|
||||
| 中文 (简体) | cn |
|
||||
| 中文 (繁體) | tw |
|
||||
| 日本語 | jp |
|
||||
| Русский | ru |
|
||||
| Español | es |
|
||||
| Français | fr |
|
||||
| Deutsch | de |
|
||||
| Italiano | it |
|
||||
| Slovenčina | sk |
|
||||
| Українська | uk |
|
||||
| Беларуская | be |
|
||||
| Dansk | da |
|
||||
| Polski | pl |
|
||||
| Português Brasileiro | br |
|
||||
| Čeština | cs |
|
||||
| Nederlands | nl |
|
||||
| Slovenščina| sl |
|
||||
| Türkçe| tr |
|
||||
| ภาษาไทย | th |
|
||||
| 한국어 | kr |
|
||||
| Language | key |
|
||||
| -------------------- | --- |
|
||||
| English | en |
|
||||
| 中文 (简体) | cn |
|
||||
| 中文 (繁體) | tw |
|
||||
| 日本語 | jp |
|
||||
| Русский | ru |
|
||||
| Español | es |
|
||||
| Français | fr |
|
||||
| Deutsch | de |
|
||||
| Italiano | it |
|
||||
| Slovenčina | sk |
|
||||
| Українська | uk |
|
||||
| Беларуская | be |
|
||||
| Dansk | da |
|
||||
| Polski | pl |
|
||||
| Português Brasileiro | br |
|
||||
| Čeština | cs |
|
||||
| Nederlands | nl |
|
||||
| Slovenščina | sl |
|
||||
| Türkçe | tr |
|
||||
| ภาษาไทย | th |
|
||||
| 한국어 | kr |
|
||||
|
||||
</RouteEn>
|
||||
|
||||
@@ -193,8 +193,8 @@ Use `library` as the `owner` for official images, such as <https://rsshub.app/do
|
||||
Language
|
||||
|
||||
| Simplified Chinese | Traditional Chinese | English |
|
||||
| ------ | -------- | -------- |
|
||||
| cn | tw | en |
|
||||
| ------------------ | ------------------- | ------- |
|
||||
| cn | tw | en |
|
||||
|
||||
</RouteEn>
|
||||
|
||||
@@ -244,6 +244,20 @@ Language
|
||||
|
||||
<RouteEn author="maokwen" example="/hugo/releases" path="/hugo/releases"/>
|
||||
|
||||
## iFi audio
|
||||
|
||||
### Download Hub
|
||||
|
||||
<RouteEn author="NavePnow" example="/ifi-audio/download/1503007035/44472" path="/ifi-audio/download/:val/:id" :paramsDesc="['product val', 'product id']"/>
|
||||
|
||||
::: warning
|
||||
|
||||
1. Open <https://ifi-audio.com/download-hub> and the Network panel
|
||||
2. Select the device and the corresponding serial number in the website and click Search
|
||||
3. Find the last request named <https://ifi-audio.com/wp-admin/admin-ajax.php> in the Network panel, find out the val and id in the Payload panel, and fill in the url
|
||||
|
||||
:::
|
||||
|
||||
## ImageMagick
|
||||
|
||||
### Changelog
|
||||
@@ -423,8 +437,8 @@ Refer to [#minecraft](/en/game.html#minecraft)
|
||||
<RouteEn author="nczitzk" example="/rescuetime/release-notes" path="/rescuetime/release-notes/:os?" :paramsDesc="['OS id, see below']">
|
||||
|
||||
| Mac OS | Windows |
|
||||
| - | - |
|
||||
| mac | windows |
|
||||
| ------ | ------- |
|
||||
| mac | windows |
|
||||
|
||||
</RouteEn>
|
||||
|
||||
@@ -468,28 +482,28 @@ Refer to [#minecraft](/en/game.html#minecraft)
|
||||
|
||||
Language
|
||||
|
||||
| Id | Language |
|
||||
| -- | ------------------- |
|
||||
| en | English |
|
||||
| ru | Русский |
|
||||
| ja | 日本語 |
|
||||
| es | Español |
|
||||
| tr | Türkçe |
|
||||
| ko | 한국어 |
|
||||
| it | Italiano |
|
||||
| pt | Português do Brasil |
|
||||
| de | Deutsch |
|
||||
| fr | Français |
|
||||
| pl | Polski |
|
||||
| id | Bahasa Indonesia |
|
||||
| my | Bahasa Malaysia |
|
||||
| tw | 繁體 |
|
||||
| cn | 简体 |
|
||||
| vi | Tiếng Việt |
|
||||
| th | ภาษาไทย |
|
||||
| sv | Svenska |
|
||||
| ar | العربية |
|
||||
| il | Hebrew |
|
||||
| Id | Language |
|
||||
| --- | ------------------- |
|
||||
| en | English |
|
||||
| ru | Русский |
|
||||
| ja | 日本語 |
|
||||
| es | Español |
|
||||
| tr | Türkçe |
|
||||
| ko | 한국어 |
|
||||
| it | Italiano |
|
||||
| pt | Português do Brasil |
|
||||
| de | Deutsch |
|
||||
| fr | Français |
|
||||
| pl | Polski |
|
||||
| id | Bahasa Indonesia |
|
||||
| my | Bahasa Malaysia |
|
||||
| tw | 繁體 |
|
||||
| cn | 简体 |
|
||||
| vi | Tiếng Việt |
|
||||
| th | ภาษาไทย |
|
||||
| sv | Svenska |
|
||||
| ar | العربية |
|
||||
| il | Hebrew |
|
||||
|
||||
</RouteEn>
|
||||
|
||||
|
||||
@@ -276,6 +276,20 @@ pageClass: routes
|
||||
|
||||
<Route author="maokwen" example="/hugo/releases" path="/hugo/releases"/>
|
||||
|
||||
## iFi audio
|
||||
|
||||
### Download Hub
|
||||
|
||||
<Route author="NavePnow" example="/ifi-audio/download/1503007035/44472" path="/ifi-audio/download/:val/:id" :paramsDesc="['商品 val', '商品 id']"/>
|
||||
|
||||
::: warning 注意
|
||||
|
||||
1. 打开网站 <https://ifi-audio.com/download-hub> 并打开 Inspect -> Network 调试面板
|
||||
2. 在网站中选择设备以及对应的 serial number,点击搜索
|
||||
3. 在 Network 面板中找到最后一个 <https://ifi-audio.com/wp-admin/admin-ajax.php> 请求,查看 Payload 中的 val 和 id,填写在 url 中
|
||||
|
||||
:::
|
||||
|
||||
## ImageMagick
|
||||
|
||||
### Changelog
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
|
||||
const host = 'https://ifi-audio.com';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const { val, id } = ctx.params;
|
||||
|
||||
const url = host + '/wp-admin/admin-ajax.php';
|
||||
const response = await got({
|
||||
method: 'post',
|
||||
url,
|
||||
headers: {
|
||||
'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
|
||||
},
|
||||
body: 'action=ifi-ff-get-firmware&val=' + val + '&id=' + id,
|
||||
});
|
||||
const markup = response.data.data.markup;
|
||||
const $ = cheerio.load(markup);
|
||||
const latestTitle = $('li[data-category=firmware]:first h4').text();
|
||||
const latestDownloadLink = $('li[data-category=firmware]:first a').attr('href');
|
||||
ctx.state.data = {
|
||||
title: 'iFi audio Download Hub',
|
||||
link: 'https://ifi-audio.com/download-hub/',
|
||||
description: 'iFi audio Download Hub',
|
||||
item: [
|
||||
{
|
||||
title: latestTitle,
|
||||
description: markup,
|
||||
link: latestDownloadLink,
|
||||
},
|
||||
],
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
'/download/:val/:id': ['NavePnow'],
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
module.exports = function (router) {
|
||||
router.get('/download/:val/:id', require('./download'));
|
||||
};
|
||||
Reference in New Issue
Block a user