1.itchat方式登录微信
itchat.auto_login()
#不想每次都扫描,登录时预配置
#itchat.auto_login(hotReload=True)
#itchat.run()
2.或者 第二种bot方法登录微信
def login_wechat():
global bot
bot = Bot()
以上两种方式登录微信都会出现以下告警信息
错误告警如下:
Traceback (most recent call last):
File “wechat1.py”, line 72, in
sendNews()
File “wechat1.py”, line 37, in sendNews
itchat.auto_login()
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-p
ackages\itchat\components\register.py”, line 35, in auto_login
loginCallback=loginCallback, exitCallback=exitCallback)
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-p
ackages\itchat\components\login.py”, line 73