Fix guid not being unique in appstore/price (#600)
This commit is contained in:
parent
9547b2992e
commit
02e6932fa7
|
|
@ -164,7 +164,7 @@ RSSHub 同时支持 RSS 2.0、Atom 和 [JSON Feed](https://jsonfeed.org/) 输出
|
|||
|
||||
参数:
|
||||
|
||||
- id, fir app id, 必选, 如 fir 生成的链接地址为 https://fir.im/xcz, 则 id 为 xcz
|
||||
- id, fir app id, 必选, 如 fir 生成的链接地址为 https://fir.im/xcz, 则 id 为 `xcz`
|
||||
|
||||
### App Store/Mac App Store 应用更新 <Author uid="cielpy"/>
|
||||
|
||||
|
|
@ -174,9 +174,9 @@ RSSHub 同时支持 RSS 2.0、Atom 和 [JSON Feed](https://jsonfeed.org/) 输出
|
|||
|
||||
参数:
|
||||
|
||||
- country, App Store 国家, 必选, 如 QQ 的链接为 https://itunes.apple.com/cn/app/qq/id444934666?mt=8, 则 country 为 cn
|
||||
- country, App Store 国家, 必选, 如 QQ 的链接为 https://itunes.apple.com/cn/app/qq/id444934666?mt=8, 则 country 为 `cn`
|
||||
|
||||
- id, App Store app id, 必选, 如 QQ 的链接为 https://itunes.apple.com/cn/app/qq/id444934666?mt=8, 则 id 为 id444934666
|
||||
- id, App Store app id, 必选, 如 QQ 的链接为 https://itunes.apple.com/cn/app/qq/id444934666?mt=8, 则 id 为 `id444934666`
|
||||
|
||||
### App Store/Mac App Store 价格更新(限免) <Author uid="HenryQW"/>
|
||||
|
||||
|
|
@ -186,11 +186,11 @@ RSSHub 同时支持 RSS 2.0、Atom 和 [JSON Feed](https://jsonfeed.org/) 输出
|
|||
|
||||
参数:
|
||||
|
||||
- country, App Store 国家, 必选, 如 Squash 的链接为 https://itunes.apple.com/cn/app/id1152443474, 则 country 为 cn
|
||||
- country, App Store 国家, 必选, 如 Squash 的链接为 https://itunes.apple.com/cn/app/id1152443474, 则 country 为 `cn`
|
||||
|
||||
- type, App 类型, 必选, `iOS` 或 `mac`
|
||||
|
||||
- id, App Store app id, 必选, 如 Squash 的链接为 https://itunes.apple.com/cn/app/id1152443474, 则 id 为 id115244347
|
||||
- id, App Store app id, 必选, 如 Squash 的链接为 https://itunes.apple.com/cn/app/id1152443474, 则 id 为 `id115244347`
|
||||
|
||||
### App Store/Mac App Store 内购价格更新(限免) <Author uid="HenryQW"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ id, App Store app id, obtain from the app URL `https://itunes.apple.com/us/app/r
|
|||
|
||||
### App Store/Mac App Store Price Drop Alert <Author uid="HenryQW"/>
|
||||
|
||||
eg: [https://rsshub.app/appstore/price/us/mac/id1152443474](https://rsshub.app/appstore/price/cn/mac/id1152443474)
|
||||
Eg: [https://rsshub.app/appstore/price/us/mac/id1152443474](https://rsshub.app/appstore/price/cn/mac/id1152443474)
|
||||
|
||||
Route: `/appstore/price/:country/:type/:id`
|
||||
|
||||
|
|
|
|||
|
|
@ -19,14 +19,13 @@ module.exports = async (ctx) => {
|
|||
const item = list
|
||||
.map((i, e) => ({
|
||||
link,
|
||||
guid:
|
||||
`${titleTemp} ${$(e)
|
||||
.find('h3.we-lockup__title')
|
||||
.text()
|
||||
.trim()} is now ${$(e)
|
||||
.find('h5')
|
||||
.text()
|
||||
.trim()}` + Date.now(),
|
||||
guid: `${titleTemp} ${$(e)
|
||||
.find('h3.we-lockup__title')
|
||||
.text()
|
||||
.trim()} ${$(e)
|
||||
.find('h5')
|
||||
.text()
|
||||
.trim()}`,
|
||||
title: `${titleTemp} ${$(e)
|
||||
.find('h3.we-lockup__title')
|
||||
.text()
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ module.exports = async (ctx) => {
|
|||
title: `${result.title} is now ${currency(result.currency)}${result.price} `,
|
||||
description: `<a href="${link}" target="_blank">Go to App Store</a>`,
|
||||
link,
|
||||
guid: country + id,
|
||||
guid: id + Date.now(),
|
||||
};
|
||||
item.push(single);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue