问题描述
这与类似这样的帖子有关: iTunes API:取得应用程式的100x100像素图示
This is related to posts like this: iTunes API: get 100x100 px icon of an App
但是,由于接受回答中描述的方法似乎在某些情况下却被打破了,但是始终如一,我要问是否有已知的解决方法或其他解决方案.如何获得要求的尺寸(例如100x100像素,150x150像素等)的应用图片?
However since the method described in the accept answered there seems to be broken on a few, yet consistent, occasions, I'm gonna ask if there is a known workaround or other fix for this. How can we get artwork of an app in a requested size like 100x100 pixels, 150x150 pixels etc?
方法是这样的:
- 获取应用程序的Apple ID.对于安格里鸟,是343200656
- 使用iTunes API进行查找. https://itunes.apple.com/lookup?id=343200656
- 获取artworkUrl512,这些天可能与artworkUrl100相同,但无论如何.对于愤怒的小鸟,它是 http://a1854.phobos.apple.com/us/r30/Purple3/v4/2d/5c/a1/2d5ca114-71f0-0687-6ebb-d10055b89fe6/pr_sourcepng. ?downloadKey = 1429243548_2f0a88b4ea441432cc948d9377a86569
- 我认为我们可以削减?一切都在右边.不确定此步骤,这似乎是最近发生的事情(?). http://a1854.phobos.apple.com/us/r30/Purple3/v4/2d/5c/a1/2d5ca114-71f0-0687-6ebb-d10055b89fe6/pr_source.png
- 将最后一个 .png 替换为 .100x100-75.png ,其中NxN是所需像素的大小.我们尝试使用100x100,因此: http://a1854.phobos.apple.com/us/r30/Purple3/v4/2d/5c/a1/2d5ca114-71f0-0687-6ebb-d10055b89fe6/pr_source.100x100 -75.png
- Get the Apple ID of the app. For ANgry birds, it's 343200656
- Use iTunes API to do a lookup. https://itunes.apple.com/lookup?id=343200656
- Get the artworkUrl512, it's likely the same as artworkUrl100 these days but whatever. For Angry birds, it's http://a1854.phobos.apple.com/us/r30/Purple3/v4/2d/5c/a1/2d5ca114-71f0-0687-6ebb-d10055b89fe6/pr_source.png?downloadKey=1429243548_2f0a88b4ea441432cc948d9377a86569
- I think we can cut the ? and everything to the right. Not sure about this step, this seems to be a fairly recent (?) thing. http://a1854.phobos.apple.com/us/r30/Purple3/v4/2d/5c/a1/2d5ca114-71f0-0687-6ebb-d10055b89fe6/pr_source.png
- Replace the last .png with .100x100-75.png where the NxN is the size in pixels you want. We try 100x100 so: http://a1854.phobos.apple.com/us/r30/Purple3/v4/2d/5c/a1/2d5ca114-71f0-0687-6ebb-d10055b89fe6/pr_source.100x100-75.png
甜.
- 这一次它起作用了.我们应该得到100x100的图片,而不是默认情况下ArtworkUrl512给出的1024x1024.
对于某些应用程序,步骤5只会返回404错误.
And for SOME apps, step 5 just gives a 404 error back.
可能的经验教训:
- 由于这始终是未记录的功能,因此它肯定会中断,在某些时候没有任何通知.
- As this always was an undocumented feature, it was bound to break,without any notice, at some point.
推荐答案
用100x100-85.png
替换文件名,它将起作用.
Replace the filename with 100x100-85.png
and it will work.
当前,查找API正在为artworkUrl512
返回以下URL:
Currently the lookup API is returning the following URL for artworkUrl512
:
如果将0x0ss-85.jpg
替换为100x100-85.png
,则会得到100x100文件:
If you replace 0x0ss-85.jpg
with 100x100-85.png
, you get the 100x100 file:
这篇关于iTunes API ArtworkUrl512获取不同图标大小的方法不再起作用,对吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!