PS D:\01VSCodeScript\Python> pip install -U wxpy Collecting wxpy Downloading wxpy-0.3.9.8.tar.gz (45 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 45.7/45.7 kB 283.9 kB/s eta 0:00:00 Preparing metadata (setup.py) ... done Collecting itchat==1.2.32 Downloading itchat-1.2.32-py2.py3-none-any.whl (34 kB) Requirement already satisfied: requests in c:\users\12593\appdata\roaming\python\python310\site-packages (from wxpy) (2.28.1) Collecting future Downloading future-0.18.2.tar.gz (829 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 829.2/829.2 kB 7.3 kB/s eta 0:00:00 Preparing metadata (setup.py) ... done Collecting pypng Downloading pypng-0.0.21-py3-none-any.whl (48 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 48.1/48.1 kB 14.4 kB/s eta 0:00:00 Collecting pyqrcode Downloading PyQRCode-1.2.1.zip (41 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.9/41.9 kB 17.6 kB/s eta 0:00:00 Preparing metadata (setup.py) ... done Requirement already satisfied: idna<4,>=2.5 in c:\users\12593\appdata\roaming\python\python310\site-packages (from requests->wxpy) (3.3) Requirement already satisfied: charset-normalizer<3,>=2 in c:\users\12593\appdata\roaming\python\python310\site-packages (from requests->wxpy) (2.1.0) Requirement already satisfied: certifi>=2017.4.17 in c:\users\12593\appdata\roaming\python\python310\site-packages (from requests->wxpy) (2022.6.15) Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\12593\appdata\roaming\python\python310\site-packages (from requests->wxpy) (1.26.10) Using legacy 'setup.py install' for wxpy, since package 'wheel' is not installed. Using legacy 'setup.py install' for future, since package 'wheel' is not installed. Using legacy 'setup.py install' for pyqrcode, since package 'wheel' is not installed. Installing collected packages: pyqrcode, pypng, future, itchat, wxpy Running setup.py install for pyqrcode ... done Running setup.py install for future ... done Running setup.py install for wxpy ... done Successfully installed future-0.18.2 itchat-1.2.32 pypng-0.0.21 pyqrcode-1.2.1 wxpy-0.3.9.8 PS D:\01VSCodeScript\Python>
from wxpy import * #初始化机器人,扫码登录 bot=Bot() # 给即日起自己发送消息 bot.self.send('hello word!') # 给文件传输助手发送消息 bot.file_helper.send('hello word!')
发生异常: ExpatError mismatched tag: line 63, column 4
查到原因是:https://wx.qq.com/ ,微信官网已经禁用使用微信网页版登录了;