为什么iTunes商店评论RSS Feed有时会返回没有结果?

时间:2021-07-31 01:54:37

I'm trying to import reviews for certain apps on the iTunes App Store via the public reviews RSS feed. Most of the time the feed returns a list of 50 reviews per page, and gives me links for up to 10 pages. But in the case of some apps, some or all of those pages have 0 reviews, and I can't tell why.

我正试图通过公共评论RSS提要导入iTunes App Store上某些应用的评论。大多数情况下,Feed会返回每页50条评论的列表,并为我提供最多10页的链接。但在某些应用程序的情况下,这些页面中的部分或全部都有0条评论,我不知道为什么。

At the time of this writing, the feed for Instagram (link below) returns no reviews, despite reporting that there's 10 pages of reviews available.

在撰写本文时,Instagram的订阅源(链接如下)不会返回评论,尽管报道有10页的评论可用。

https://itunes.apple.com/us/rss/customerreviews/page=1/id=389801252/sortBy=mostrecent/xml

https://itunes.apple.com/us/rss/customerreviews/page=1/id=389801252/sortBy=mostrecent/xml

Even more confusing, I noticed last night that page 2 had 50 reviews but none of the other pages had any. This morning, page 2 is empty again.

更令人困惑的是,昨晚我注意到第2页有50条评论,但其他页面都没有。今天早上,第2页再次出现空白。

If I remove the sortBy=mostrecent portion of the URL above, I actually do get 50 results back, but none of the other pages have any results.

如果我删除上面URL的sortBy = mostrecent部分,我实际上会得到50个结果,但其他页面都没有任何结果。

Finally, it appears as if the JSON version of this page (link below) actually returns results better than the XML version. Unfortunately, the JSON version leaves off the date of the review in the data so I can't use it.

最后,看起来该页面的JSON版本(下面的链接)实际上返回的结果比XML版本更好。不幸的是,JSON版本在数据中没有审核日期,因此我无法使用它。

https://itunes.apple.com/us/rss/customerreviews/page=1/id=389801252/sortBy=mostrecent/json

https://itunes.apple.com/us/rss/customerreviews/page=1/id=389801252/sortBy=mostrecent/json

Can anyone explain this? Is Apple's XML feed API just extremely unreliable? Am I forming a bad URL?

有谁能解释一下? Apple的XML Feed API是否非常不可靠?我是否形成了错误的网址?

1 个解决方案

#1


1  

While this answer isn't very satisfying, it's the best I could work out after many trials. It appears as if the XML feed is really fallible and shouldn't be used for real-world usage. Furthermore, when using the public JSON feed, certain fields such as review date are missing. Neither feed reports developer response.

虽然这个答案不是很令人满意,但经过多次试验后,这是我能做到的最好的答案。看起来XML feed非常容易错误,不应该用于实际使用。此外,使用公共JSON提要时,缺少某些字段,例如审阅日期。这两个Feed均未报告开发人员的响

It's also clear that Apple doesn't use these feeds for iTunes (desktop) or App Store (iOS). I ultimately reverse-engineered the way iTunes requests review data and figured out that making a request the same way, making sure to match their User Agent and version, would return the data I needed. These requests seem to be rate-limited to a certain extent and the data comes as a mix of HTML and JSON that requires a lot of parsing. Furthermore, because they're private calls, Apple could easily shut the door at any moment.

很明显,Apple不会将这些Feed用于iTunes(桌面)或App Store(iOS)。我最终反向设计了iTunes请求审核数据的方式,并发现以同样的方式提出请求,确保匹配他们的用户代理和版本,将返回我需要的数据。这些请求似乎在一定程度上受到速率限制,数据是HTML和JSON的混合,需要大量解析。此外,因为他们是私人电话,苹果可以随时轻松关门。

#1


1  

While this answer isn't very satisfying, it's the best I could work out after many trials. It appears as if the XML feed is really fallible and shouldn't be used for real-world usage. Furthermore, when using the public JSON feed, certain fields such as review date are missing. Neither feed reports developer response.

虽然这个答案不是很令人满意,但经过多次试验后,这是我能做到的最好的答案。看起来XML feed非常容易错误,不应该用于实际使用。此外,使用公共JSON提要时,缺少某些字段,例如审阅日期。这两个Feed均未报告开发人员的响

It's also clear that Apple doesn't use these feeds for iTunes (desktop) or App Store (iOS). I ultimately reverse-engineered the way iTunes requests review data and figured out that making a request the same way, making sure to match their User Agent and version, would return the data I needed. These requests seem to be rate-limited to a certain extent and the data comes as a mix of HTML and JSON that requires a lot of parsing. Furthermore, because they're private calls, Apple could easily shut the door at any moment.

很明显,Apple不会将这些Feed用于iTunes(桌面)或App Store(iOS)。我最终反向设计了iTunes请求审核数据的方式,并发现以同样的方式提出请求,确保匹配他们的用户代理和版本,将返回我需要的数据。这些请求似乎在一定程度上受到速率限制,数据是HTML和JSON的混合,需要大量解析。此外,因为他们是私人电话,苹果可以随时轻松关门。