python_itchat模块登陆问题

import itchat,re
from itchat.content import *
# enableCmdQR 设置是否在终端中显示可扫描的二维码,默认值写True,2为字符宽度,负号为反色,如果颜色与终端栏接近,可以反色对调
itchat.auto_login(enableCmdQR=-2,hotReload=True) 
print('-'*50)
itchat.run()

微信登陆错误问题

0、Error:You can't get access to internet or wechat domain, so exit.

-> 可能1:certifi模块版本过高,回退低版本尝试

1、将certifi 回退 无效(卸载:pip3 uninstall -y certifi ,安装pip install certifi==2015.04.28 )

-> 可能2:代理问题导致微信无法登陆

2、将浏览器代理关闭,无效

3、将charles软件关闭,好用了!~~~ 再次将certifi更新最新版

4、出现二维码,但无法扫描,好像少了一半?

5、根据网上资料,找到原因 可能是块字符在一些系统上显示的宽度不对,把enableCmdQR数据由True调整为2,成功

 

posted @ 2018-09-28 14:54  贺健龙  阅读(5667)  评论(0编辑  收藏  举报