pig6 / wxrobot Goto Github PK
View Code? Open in Web Editor NEW基于python的微信机器人
基于python的微信机器人
File "robot.py", line 8
SyntaxError: Non-ASCII character '\xe5' in file robot.py on line 8, but no encoding declared;
微信不能登陆网页版了
linux运行不显示二维码,在加了console_qr参数后,二维码成功显示,然后出现了错误.
我是在robot.py的第10行进行改动,加上了console_qr参数:
bot = Bot(console_qr=True, cache_path=True)
出现了以下错误:
File "robot.py", line 12, in
load.load_config_to_bot(bot)
File "/root/wxrobot/load.py", line 30, in load_config_to_bot
bot.is_forward_revoke_msg = config.is_forward_revoke_msg
AttributeError: module 'config' has no attribute 'is_forward_revoke_msg'
求教大佬该怎么解决这个问题 拜谢拜谢.
Downloading QR code.
██████████████████████████████████████████████████████████████████████████████
██ ████ ████████ ██████████████████ ██ ██████ ██
██ ██████████ ████ ██ ████ ██████████ ████████ ████████ ██████████ ██
██ ██ ██ ██ ████ ██ ██ ████ ██ ██ ██ ██ ██
██ ██ ██ ██ ██ ██ ████ ██ ████ ████████ ██ ██ ██ ██
██ ██ ██ ████ ██ ████ ██ ██ ██ ██ ██████ ██ ██ ██
██ ██████████ ██████ ████ ██ ████ ██ ████ ██████ ██████████ ██
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
████████████████████ ██ ████ ████ ██ ████ ██ ██████████████████
████████ ██ ██ ████████ ████████ ██ ██████████████████ ██████
████ ██ ██ ██ ████████████████████ ██ ██ ██ ████
████ ████ ██ ██ ██ ██ ████ ██ ██ ██████ ██
████ ██████ ██ ██ ██ ██ ██████████ ██ ████████ ██ ████ ██ ██
██ ██ ██ ██████ ██ ████ ██████ ██ ██ ██ ██
██████ ██████ ████ ██ ██ ██ ████ ██ ██████
██████████ ██ ████ ████ ██████████ ██ ██ ██ ██ ██
██ ████████ ████ ██ ████ ██████ ██ ████████ ██ ████ ████
████████ ██████ ████ ████ ██ ████ ██ ████ ██ ██
██ ████████ ██ ██ ████ ████████ ██ ██ ██ ██████ ████
██ ██ ██ ████ ██ ██ ██████ ████ ██████ ████ ██ ██
██ ████ ████████ ██ ██ ██ ██████ ██ ██████ ██████ ████████
████████ ██ ██ ████████ ████ ██ ██ ██ ██ ██ ████████
██ ████████████ ██ ██ ████ ████ ██ ██ ████ ██ ████
██ ██ ██ ████ ████ ██ ████████████████ ████ ████ ██ ██████ ██
████ ██ ████████ ██████ ██ ██ ██ ████ ██████
████ ██ ██████ ██████ ██ ██ ████ ██ ██ ████ ██ ████
██ ██ ██████ ██ ██████████████ ████ ██ ██ ██ ██ ████
██ ████ ████ ████ ██████████ ██ ████ ████ ██ ████ ██
██ ██ ████ ██████ ████ ████ ██ ████ ██ ██ ██ ██████ ██████
██ ██ ██ ██ ████ ██ ██ ██ ████ ████████
██████████████████ ██ ████████ ████ ██████ ████ ██████ ████
██ ██ ██ ██ ██████████ ██████ ██ ██ ██ ██
██ ██████████ ██████ ████ ████████ ██ ██ ██████ ██ ████
██ ██ ██ ██ ████ ██ ██████████ ████ ████ ████
██ ██ ██ ██ ████ ████████ ██ ██ ████████ ██ ████ ████████
██ ██ ██ ████ ████████████ ████ ██ ██ ████ ████ ██
██ ██████████ ██████ ██████████████ ██ ██ ██████ ██████ ██ ██ ██
██ ████ ████ ████ ██ ██ ████ ████ ██ ████ ████ ██
██████████████████████████████████████████████████████████████████████████████
Please scan the QR code to log in.
Please press confirm on your phone.
Loading the contact, this may take a little while.
Traceback (most recent call last):
File "robot.py", line 11, in
bot = Bot(cache_path=True, console_qr=True)
File "/home/pi/.local/lib/python3.7/site-packages/wxpy/api/bot.py", line 86, in init
loginCallback=login_callback, exitCallback=logout_callback
File "/home/pi/.local/lib/python3.7/site-packages/itchat/components/register.py", line 30, in auto_login
loginCallback=loginCallback, exitCallback=exitCallback)
File "/home/pi/.local/lib/python3.7/site-packages/itchat/components/login.py", line 66, in login
self.show_mobile_login()
File "/home/pi/.local/lib/python3.7/site-packages/itchat/components/login.py", line 212, in show_mobile_login
self.loginInfo['url'], self.loginInfo['pass_ticket'])
KeyError: 'pass_ticket'
微信8.0.1协议API 自定义部署 crm 联系[email protected] tg https://t.me/ipad233
机器人主人昵称里 有大写字母 会报错???
raise ResponseError(err_code=err_code, err_msg=err_msg)
wxpy.exceptions.ResponseError: err_code: 1204; err_msg:
二维码可以正常扫描,在手机端确认信息后,报错信息如下:
`Traceback (most recent call last):
File "C:/Users/chris/PycharmProjects/wxrobot/robot.py", line 11, in
bot = Bot(cache_path=True)
File "C:\Users\chris\PycharmProjects\wechatrobot\venv\lib\site-packages\wxpy\api\bot.py", line 86, in init
loginCallback=login_callback, exitCallback=logout_callback
File "C:\Users\chris\PycharmProjects\wechatrobot\venv\lib\site-packages\itchat\components\register.py", line 30, in auto_login
loginCallback=loginCallback, exitCallback=exitCallback)
File "C:\Users\chris\PycharmProjects\wechatrobot\venv\lib\site-packages\itchat\components\login.py", line 66, in login
self.show_mobile_login()
File "C:\Users\chris\PycharmProjects\wechatrobot\venv\lib\site-packages\itchat\components\login.py", line 212, in show_mobile_login
self.loginInfo['url'], self.loginInfo['pass_ticket'])
KeyError: 'pass_ticket'
Process finished with exit code 1`
我用小号加入学校的家长群,各科老师会在里面发作业,我发现只有跟我是好友的老师的可以转发,不是好友的不能转发,是我设置的问题吗?麻烦各位大大给指导一下,万分感谢!
@bot.register(Group, PICTURE)
def recv_image(msg):
pass
代码如上,不能收到机器人微信账号发送的图片消息。这个调试程序不太方便,还是有别的配置可以设置呢?
微信登录重复,需要扫码两次
你好,我的云服务器为Ubuntu16.04,按照教程执行pip3 install -U wxpy -i "https://pypi.doubanio.com/simple/"下载wxpy库时,报错,信息如下
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named 'setuptools'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-3an5dqxg/wxpy/
我已经按照https://blog.csdn.net/sxingming/article/details/54178649的方法安装了setuptools,并无错误信息,再次执行下载wxpy库还是同样的错误,请指教原因,谢谢
撤回模块好像对大于一定大小的文件/图片/视频无效
在ubuntu服务器上运行,二维码会乱码,itchat的话可以加enableCmdQR=2解决,这个不懂怎么办啊
替代itchat项目来了,NtChat 基于pc微信的解决方案
windows下无法识别登录二维码
env:
Docker version
Client:
Version: 18.09.2
API version: 1.39
Go version: go1.10.4
Git commit: 6247962
Built: Tue Feb 26 23:52:23 2019
OS/Arch: linux/amd64
Experimental: false
Server:
Engine:
Version: 18.09.2
API version: 1.39 (minimum version 1.12)
Go version: go1.10.4
Git commit: 6247962
Built: Wed Feb 13 00:24:14 2019
OS/Arch: linux/amd64
Experimental: false
Image: python:3.7
Please scan the QR code to log in.
Please press confirm on your phone.
Loading the contact, this may take a little while.
Traceback (most recent call last):
File "robot.py", line 10, in
bot = Bot(cache_path=True, console_qr=True)
File "/usr/local/lib/python3.7/site-packages/wxpy/api/bot.py", line 86, in init
loginCallback=login_callback, exitCallback=logout_callback
File "/usr/local/lib/python3.7/site-packages/itchat/components/register.py", line 30, in auto_login
loginCallback=loginCallback, exitCallback=exitCallback)
File "/usr/local/lib/python3.7/site-packages/itchat/components/login.py", line 66, in login
self.show_mobile_login()
File "/usr/local/lib/python3.7/site-packages/itchat/components/login.py", line 212, in show_mobile_login
self.loginInfo['url'], self.loginInfo['pass_ticket'])
KeyError: 'pass_ticket'
listen_friend_groups = '云' # 在这些群里监听好友说的话,匹配模式:包含“唯一集团工作群”的群
我想监听的多个群聊没有共同关键词,而用|并不能包括两个关键词
Traceback (most recent call last):
File "robot.py", line 12, in
load.load_config_to_bot(bot)
File "G:\projects\pyp\wxrobot-master\load.py", line 40, in load_config_to_bot
bot.master.send(bot_status)
File "C:\Users\Administrator\Anaconda3\envs\py35\lib\site-packages\wxpy\api\chats\chat.py", line 163, in send
return self.send_msg(msg=content)
File "C:\Users\Administrator\Anaconda3\envs\py35\lib\site-packages\wxpy\api\chats\chat.py", line 54, in wrapped
ret = do_send()
File "C:\Users\Administrator\Anaconda3\envs\py35\lib\site-packages\wxpy\utils\misc.py", line 72, in wrapped
smart_map(check_response_body, ret)
File "C:\Users\Administrator\Anaconda3\envs\py35\lib\site-packages\wxpy\utils\misc.py", line 207, in smart_map
return func(i, *args, **kwargs)
File "C:\Users\Administrator\Anaconda3\envs\py35\lib\site-packages\wxpy\utils\misc.py", line 53, in check_response_body
raise ResponseError(err_code=err_code, err_msg=err_msg)
wxpy.exceptions.ResponseError: err_code: 1; err_msg:
LOG OUT!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.