网上搜的答案都是把User-Agent设置成Mozilla/5.0 (iPhone; CPU iPhone OS 11_1_2 like Mac OS X) AppleWebKit/604.3.5 (KHTML, like Gecko) Mobile/15B202 MicroMessenger/6.5.23 NetType/WIFI Language/zh_CN之类的.

但是我这样设置后, 响应的仍然是esponse: {'body': u"<script language='javascript'>window.top.location.href='/hemp170/ns/wechat/userLogin/v1/wechatLogin.do';</script>", 'status_code': 200, 'headers': {'Content-Length': '112', 'Content-Encoding': 'gzip', 'Set-Cookie': 'ClientIdCookie=218.76.7.165.1513308014842877; path=/', 'Vary': 'Accept-Encoding', 'Keep-Alive': 'timeout=15, max=100', 'Server': 'Apache-Coyote/1.1', 'Connection': 'Keep-Alive', 'Date': 'Fri, 15 Dec 2017 03:20:35 GMT', 'Content-Type': 'text/html;charset=UTF-8'}} .

仍然是报错要在微信端打开网页..
求解决办法..


↙↙↙阅读原文可查看相关链接,并与作者交流