获取 apple store 应用图标【API分享】
也是从 itunes 里找到的接口,可以方便的获取一些应用的 app
curl --location 'https://itunes.apple.com/search?term=%E7%BD%91%E7%9B%98&country=cn&entity=software&limit=20' \
--header 'sec-ch-ua-platform: "Windows"' \
--header 'Referer: https://icon.yukonga.top/' \
--header 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36' \
--header 'Accept: application/json, text/plain, */*' \
--header 'sec-ch-ua: "Google Chrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129"' \
--header 'sec-ch-ua-mobile: ?0'
简单的实现,根据关键词搜索应用的 图标
import requests
import pprint
def get_apple_app_icons(kw: str):
url = f"https://itunes.apple.com/search?term={kw}&country=cn&entity=software&limit=20"
payload = {}
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36',
'Accept': 'application/json, text/plain, */*',
}
response = requests.request("GET", url, headers=headers, data=payload)
res = response.json()
data = res['results']
res = []
if data:
for d in data:
tmp = {
'app_name': d['trackName'],
'icons': {
'artworkUrl100': d['artworkUrl100'],
'artworkUrl512': d['artworkUrl512'],
'artworkUrl60': d['artworkUrl60'],
},
'sellerName': d['sellerName'],
}
res.append(tmp)
return res
if __name__ == '__main__':
pprint.pprint(get_apple_app_icons('网盘'))
版权声明:
本站所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自
有限进步!
喜欢就支持一下吧
打赏
微信
支付宝