首页 > selenium模拟微信浏览器失败

selenium模拟微信浏览器失败

profile = webdriver.FirefoxProfile()
u_a = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36 MicroMessenger/6.5.2.501"
profile.set_preference("general.useragent.override", u_a)
# profile.set_preference("openid", "oiqOKs7TnQw7krlIGqoGFT0N9Ap4")
browser = webdriver.Firefox(profile)
url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=id&redirect_uri=#"
browser.get(url)
browser.implicitly_wait(5)
print browser.get_cookies()
以上代码实现不了模拟微信浏览器,请教高手还有什么需要设置的呢?
【热门文章】
【热门文章】