gpt4 book ai didi

python - 如何骗过apple store(解析)

转载 作者:行者123 更新时间:2023-11-29 12:37:32 24 4
gpt4 key购买 nike

我正在尝试从苹果商店获取应用信息,但无法完全模仿真实的浏览器:

import requests
headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36'}
# got this user-agent from my own browser where this page opens perfectly though I don't have iTunes installed
store=requests.get('https://itunes.apple.com/en/app/real-racing-3/id556164350', headers=headers)
print store.text

我收到了 We cannot find iTunes on your computer. 错误,不是我需要的信息。希望有更好的方法可以不使用 Selenium例如

最佳答案

好吧,伙计们,我最终想到了这个:

import gtk
import webkit

web = webkit.WebView()
web.open('http://google.com/')


def load_finished(webview, frame):
data = web.get_main_frame().get_data_source().get_data()
print data[:20]
gtk.main_quit()

web.connect("load-finished", load_finished)

gtk.main()

关于python - 如何骗过apple store(解析),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25892720/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com