GithubHelp home page GithubHelp logo

youfou / wxpy Goto Github PK

View Code? Open in Web Editor NEW
13.8K 552.0 2.4K 600 KB

微信机器人 / 可能是最优雅的微信个人号 API ✨✨

Home Page: http://wxpy.readthedocs.io

License: MIT License

Python 100.00%
wechat weixin api

wxpy's Introduction

wxpy: 用 Python 玩微信

image

image

image

微信机器人 / 可能是最优雅的微信个人号 API

wxpy 在 itchat 的基础上,通过大量接口优化提升了模块的易用性,并进行丰富的功能扩展

Attention

强烈建议仅使用小号运行机器人!
从近期 (17年6月下旬) 反馈来看,使用机器人存在一定概率被限制登录的可能性。
主要表现为无法登陆 Web 微信 (但不影响手机等其他平台)。

用来干啥

一些常见的场景

  • 控制路由器、智能家居等具有开放接口的玩意儿
  • 运行脚本时自动把日志发送到你的微信
  • 加群主为好友,自动拉进群中
  • 跨号或跨群转发消息
  • 自动陪人聊天
  • 逗人玩
  • ...

总而言之,可用来实现各种微信个人号的自动化操作

轻松安装

wxpy 支持 Python 3.4-3.6,以及 2.7 版本

将下方命令中的 "pip" 替换为 "pip3" 或 "pip2",可确保安装到对应的 Python 版本中

  1. 从 PYPI 官方源下载安装 (在国内可能比较慢或不稳定):
pip install -U wxpy
  1. 从豆瓣 PYPI 镜像源下载安装 (推荐国内用户选用):
pip install -U wxpy -i "https://pypi.doubanio.com/simple/"

简单上手

登陆微信:

# 导入模块
from wxpy import *
# 初始化机器人,扫码登陆
bot = Bot()

找到好友:

# 搜索名称含有 "游否" 的男性深圳好友
my_friend = bot.friends().search('游否', sex=MALE, city="深圳")[0]

发送消息:

# 发送文本给好友
my_friend.send('Hello WeChat!')
# 发送图片
my_friend.send_image('my_picture.jpg')

自动响应各类消息:

# 打印来自其他好友、群聊和公众号的消息
@bot.register()
def print_others(msg):
    print(msg)

# 回复 my_friend 的消息 (优先匹配后注册的函数!)
@bot.register(my_friend)
def reply_my_friend(msg):
    return 'received: {} ({})'.format(msg.text, msg.type)

# 自动接受新的好友请求
@bot.register(msg_types=FRIENDS)
def auto_accept_friends(msg):
    # 接受好友请求
    new_friend = msg.card.accept()
    # 向新的好友发送消息
    new_friend.send('哈哈,我自动接受了你的好友请求')

保持登陆/运行:

# 进入 Python 命令行、让程序保持运行
embed()

# 或者仅仅堵塞线程
# bot.join()

模块特色

  • 全面对象化接口,调用更优雅
  • 默认多线程响应消息,回复更快
  • 包含 聊天机器人、共同好友 等 实用组件
  • 只需两行代码,在其他项目中用微信接收警告
  • 愉快的探索和调试,无需涂涂改改
  • 可混合使用 itchat 的原接口
  • 当然,还覆盖了各类常见基本功能:

    • 发送文本、图片、视频、文件
    • 通过关键词或用户属性搜索 好友、群聊、群成员等
    • 获取好友/群成员的昵称、备注、性别、地区等信息
    • 加好友,建群,邀请入群,移出群

说明文档

http://wxpy.readthedocs.io

更新日志

https://github.com/youfou/wxpy/releases

项目主页

https://github.com/youfou/wxpy

wxpy's People

Contributors

bluedazzle avatar ourbest avatar youfou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wxpy's Issues

请问如何填加多个好友,同时发送信息??

my_friend = robot.friends().search('游否', sex=MALE, city="深圳")[0]
robot.my_friend.send('Hello WeChat!')

此代码只能给一个好友发送信息,请问有什么方法,可以填加2个以上的好友,同时发送??

Can wxpy get context conversation?

您好~

wxpy可以获取响应上下消息么?

因为 一般的注册事件都是单句响应,图灵的上下文响应是通过特殊的uid实现的。

那么但就微信消息本身,能否做到呢?

比如

User - 用户
Bot - wxpy 程序

User: 下载xxx.mp4
下载完成是否上传? Bot
User:上传
上传完成,地址是:xxx Bot

如何实现这样的注册事件呢?现在的情况似乎无法实现,我尝试了一下。

再次感谢~

how to get the avatar url

friend = bot.friends()[6]  
friend.get_avatar(save_path='/tmp/f.jpg')

the upper code will save the avatar to the filesystem, but i just want the url weixin server returned, how can i get it?

【建议】能不能支持小冰啊?

小冰是个公众号,支持自动回复图片,声音,文字,所以我就想啊,能不能把非小冰发给我的消息全部自动发给小冰,然后提取小冰的回复,回复给非小冰对象,难点就是:有时候,你说一句,小冰有时要回复多句,而且不能分辨小冰的回复到底是回复哪一句的。。。不知道大神有没有法?

添加好友报错

接收用户消息,然后添加好友的时候报错

Fri, 28 Apr 2017 11:56:45 bot.py[line:330] ERROR
An error occurred in <function print_others at 0x7f6ea15c4730>.
Traceback (most recent call last):
File "/opt/python35/lib/python3.5/site-packages/wxpy/api/bot.py", line 326, in process
ret = config.func(msg)
File "ttsbot-prod.py", line 36, in print_others
bot.accept_friend(msg.chat)
File "/opt/python35/lib/python3.5/site-packages/wxpy/api/bot.py", line 253, in accept_friend
do()
File "/opt/python35/lib/python3.5/site-packages/wxpy/utils/misc.py", line 59, in wrapped
smart_map(check_response_body, ret)
File "/opt/python35/lib/python3.5/site-packages/wxpy/utils/misc.py", line 178, in smart_map
return func(i, *args, **kwargs)
File "/opt/python35/lib/python3.5/site-packages/wxpy/utils/misc.py", line 25, in check_response_body
raise ResponseError('ret: {}; err_msg: {}'.format(ret, err_msg))
wxpy.exceptions.ResponseError: ret: -1; err_msg:

TypeError: 'DataFrame' objects are mutable, thus they cannot be hashed

报错哎,请问怎么解决?

代码:
my_friend = bot.friends().search('Yang Hui')[0]
print(my_friend)
my_friend.send('Hello WeChat!')

log:
Getting uuid of QR code.
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.
TERM environment variable not set.
Login successfully as Yang Hui
<Friend: Yang Hui>
Traceback (most recent call last):
File "/Users/yanghui/PycharmProjects/quantest/my_strategy/复盘/notices.py", line 23, in
if key_word in notices.title:
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pandas/core/generic.py", line 871, in contains
return key in self._info_axis
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pandas/indexes/base.py", line 1393, in contains
hash(key)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pandas/core/generic.py", line 831, in hash
' hashed'.format(self.class.name))
TypeError: 'DataFrame' objects are mutable, thus they cannot be hashed

Process finished with exit code 1

获取二维码时出现 FileNotFoundError: [Errno 2] No such file or directory: 'xdg-open'

大大您好,我今天在自己的服务器上尝试配置wxpy,做到第二步获取二维码时报错,
机器是ubuntu14.04 root用户登陆
屏幕输出如下

>>> robot = Robot()
Getting uuid of QR code.
Downloading QR code.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.4/dist-packages/wxpy/wx.py", line 1024, in __init__
    loginCallback=login_callback, exitCallback=logout_callback
  File "/usr/local/lib/python3.4/dist-packages/itchat/components/register.py", line 35, in auto_login
    loginCallback=loginCallback, exitCallback=exitCallback)
  File "/usr/local/lib/python3.4/dist-packages/itchat/components/login.py", line 39, in login
    picDir=picDir, qrCallback=qrCallback)
  File "/usr/local/lib/python3.4/dist-packages/itchat/components/login.py", line 96, in get_QR
    utils.print_qr(picDir)
  File "/usr/local/lib/python3.4/dist-packages/itchat/utils.py", line 82, in print_qr
    subprocess.call(['xdg-open', fileDir])
  File "/usr/lib/python3.4/subprocess.py", line 537, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib/python3.4/subprocess.py", line 859, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.4/subprocess.py", line 1457, in _execute_child
    raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'xdg-open'

请问是我遗漏了什么步骤吗

报错 OSError: [Errno 9] Bad file descriptor

"""
In [1]: ---------------------------------------------------------------------------
OSError Traceback (most recent call last)
/root/pyprj/wxbot_pya/run.py in ()
111 pos_send()
112 complex_reply()
--> 113 embed()

/root/.virtualenvs/wxpy_bot/lib/python3.5/site-packages/wxpy/utils/console.py in embed(local, banner, shell)
64 for _shell in shell, _ipython, _bpython, _python:
65 try:
---> 66 _shell(local=local, banner=banner)
67 except (TypeError, ImportError):
68 continue

/root/.virtualenvs/wxpy_bot/lib/python3.5/site-packages/wxpy/utils/console.py in _ipython(local, banner)
12 config=load_default_config()
13 )
---> 14 shell()
15
16

/root/.virtualenvs/wxpy_bot/lib/python3.5/site-packages/IPython/terminal/embed.py in call(self, header, local_ns, module, dummy, stack_depth, global_ns, compile_flags, **kw)
226 # our call and get the original caller's namespaces.
227 self.mainloop(local_ns, module, stack_depth=stack_depth,
--> 228 global_ns=global_ns, compile_flags=compile_flags)
229
230 self.banner2 = self.old_banner2

/root/.virtualenvs/wxpy_bot/lib/python3.5/site-packages/IPython/terminal/embed.py in mainloop(self, local_ns, module, stack_depth, display_banner, global_ns, compile_flags)
321
322 with self.builtin_trap, self.display_trap:
--> 323 self.interact()
324
325 # now, purge out the local namespace of IPython's hidden variables.

/root/.virtualenvs/wxpy_bot/lib/python3.5/site-packages/IPython/terminal/interactiveshell.py in interact(self, display_banner)
467
468 try:
--> 469 code = self.prompt_for_code()
470 except EOFError:
471 if (not self.confirm_exit) \

/root/.virtualenvs/wxpy_bot/lib/python3.5/site-packages/IPython/terminal/interactiveshell.py in prompt()
222 # This is very limited, and only accepts a single line.
223 def prompt():
--> 224 return cast_unicode_py2(input('In [%d]: ' % self.execution_count))
225 self.prompt_for_code = prompt
226 return

/root/.virtualenvs/wxpy_bot/lib/python3.5/site-packages/IPython/utils/py3compat.py in input(prompt)
150 # to forward requests to a frontend.
151 def input(prompt=''):
--> 152 return builtin_mod.input(prompt)
153
154 builtin_mod_name = "builtins"

OSError: [Errno 9] Bad file descriptor
"""

SyntaxError: can use starred expression only as assignment target

环境:

Ubuntu 14.04, Python 3.4
wxpy 0.3.8,0.3.9 都有这个错误,0.3.6 无错误

代码:

from wxpy import embed, Bot

b1 = Bot()
embed()

错误:

Traceback (most recent call last):
  File "test.py", line 1, in <module>
    from wxpy import embed, Bot
  File "/lib/python3.4/site-packages/wxpy/__init__.py", line 48, in <module>
    from .api.bot import Bot
  File "/lib/python3.4/site-packages/wxpy/api/bot.py", line 12, in <module>
    from ..api.chats import Chat, Chats, Friend, Group, MP, User
  File "/lib/python3.4/site-packages/wxpy/api/chats/__init__.py", line 1, in <module>
    from .chat import Chat
  File "/lib/python3.4/site-packages/wxpy/api/chats/chat.py", line 8, in <module>
    from wxpy.utils import PuidMap, handle_response
  File "/lib/python3.4/site-packages/wxpy/utils/__init__.py", line 5, in <module>
    from .puid_map import PuidMap
  File "/lib/python3.4/site-packages/wxpy/utils/puid_map.py", line 121
    pickle.dump((*self.attr_dicts, self.captions), fp)
                            ^
SyntaxError: can use starred expression only as assignment target

[建议]建议增加消息尾巴选项

有时候想注明消息是由机器人发出来的,避免机器人造成不必要的误解,希望大神能增加一个可选参数,定义消息的尾巴。。。。。。。

增加消息管道

在 Bot 对象中增加一个新的接口,用于设置消息管道。

消息管道 (message_pipe):

  • 每当收到新消息时,除了执行相应的注册函数,还将执行用户设定的“消息管道”函数
  • 消息管道函数,通常用于执行类似“记录消息到数据库”的操作
  • 消息管道函数的执行,为一个单独线程,且始终顺序执行(只有一个线程)

貌似有内存泄漏

我开了5个微信,内存从开始的 110M,逐渐增长到 230M,而且还在持续增长,请问怎么解决

如何创建群聊

bot.create_group(users=[baisong], topic='test2')
ResponseError: ret: 1101; err_msg:

报错……

Unable get media_id

尝试发送图片消息的时候拿不到media_id , 尝试了forward 方法 , 是正常起作用的,但这个方法没法持久化的起作用,就还挺不方便的

公众号类消息只能获得多图文的头条内容

目前对于公众号类消息可以用Sharing来捕获,但是似乎仅限于单图文的。

如果对方发布的是多图文格式的,只能获得第一条的所有信息,而第二条及随后的所有信息全部被忽略。

不知道能否将多图文的信息转变为一个列表,这样可以逐一查看各自的内容。

how to use wxid to add friends

hi
老哥, 看到你commit了一个新功能,是add friend by wxid
请问一下 这个是怎么用呢。貌似没有文档出来.......

Message.reply_raw_msg(...)报错

试用文档中的例子:
@bot.register(msg_types=CARD) def reply_text(msg): msg.chat.send_raw_msg(msg.raw['MsgType'], msg.raw['Content'])
报错信息如下:

2017-05-02 23:23:07,260 root CRITICAL UNCAUGHT EXCEPTION:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/code.py", line 91, in runcode
exec(code, self.locals)
File "", line 1, in
File "/Users/rxu/dev/wxpy-master/wxpy/api/chats/chat.py", line 29, in wrapped
kwargs_, attrs_ = func(self, *args, **kwargs)
File "/Users/rxu/dev/wxpy-master/wxpy/api/chats/chat.py", line 229, in send_raw_msg
req = BaseRequest(self.bot, uri=uri)
File "/Users/rxu/dev/wxpy-master/wxpy/utils/base_request.py", line 25, in init
self.url = self.bot.core.loginInfo['url'] + uri
TypeError: Can't convert 'NoneType' object to str implicitly

好友将自己拉黑后,给对方发消息会发送多条消息

我测试的时候,让好友把发送方拉黑,发送消息的时候,会出现多条发送日志。
连续多条日志:
至尊宝: 消息已发出,但被对方拒收了。 (Note)
最后,导致该微信号被限制:
再给其他正常好友发消息也出错:
发送消息过于频繁,等待对方接受你的好友请求后再发。 (Note)

不知道有没有什么设置?感谢!

Message are sent out successfully but then raise exeception "KeyError: 'self'"

Using python3.5, and in Linux ENV.

In [43]: my_wife.send("test")
Out[43]: <ItchatReturnValue: {'MsgID': '8287475435897459665', 'LocalID': '14904491571103', 'BaseResponse': {'RawMsg': '请求成功', 'Ret': 0, 'ErrMsg': '请求成功'}}>

In [44]: Traceback (most recent call last):
File "/home/mint/.local/lib/python3.5/site-packages/itchat/components/login.py", line 240, in maintain_loop
msgList = produce_msg(self, msgList)
File "/home/mint/.local/lib/python3.5/site-packages/itchat/components/messages.py", line 61, in produce_msg
produce_group_chat(core, m)
File "/home/mint/.local/lib/python3.5/site-packages/itchat/components/messages.py", line 250, in produce_group_chat
atFlag = '@' + (chatroom['self']['DisplayName']
KeyError: 'self'

关于图灵机器人的回复

我想实现只有@机器人的消息,机器人才出来回复,不然群里面任何人说话,机器人都跳出来,很乱啊,请问这个应该怎么设置?

部分消息的 .text 为 None

Traceback (most recent call last):
File "/path/lib/python3.5/site-packages/wxpy/api/bot.py", line 295, in process
ret = config.func(msg)
File "wxbot.py", line 23, in reply_pt_kill
if 'pt' in msg.text and 'kill' in msg.text:
TypeError: argument of type 'NoneType' is not iterable

邀请入群

为什么没办法使用group的add_members和remove_members方法了。。里面username传微信昵称和微信号都不行。

如何移除指定的用户

我想@机器人 移除 某用户,这样该怎么写?
我写了一半如下:
@bot.register(teamgroup)
def remove_msg(msg):
if msg.is_at:
if '移除' in msg.text.lower():
remove_members( ) <------这个“某用户”的参数该如何传递?

报错是因为Bot被检测到?

我写了一个script,主要用来给微信群转发消息,还在测试,没有大规模用,但是log里总会有这样的报错,搜了一下有可能是被检测到是bot,所以没有正常response
http://stackoverflow.com/questions/33174804/python-requests-getting-connection-aborted-badstatusline-error
报错如下:
2017-05-13 19:59:50,616 requests.packages.urllib3.connectionpool WARNING Retrying (Retry(total=25, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', BadStatusLine('HTTP/1.1 0 -\r\n',))': /cgi-bin/mmwebwx-bin/synccheck?r=1494730776694&uin=342550695&skey=%40crypt_7a4288b7_8f6a503d952a2c85501b30509eefc69d&synckey=1_667084299%7C2_667084546%7C3_667084299%7C11_667084539%7C13_667084299%7C201_1494730774%7C203_1494730575%7C1000_1494723422%7C1001_1494723452%7C1004_1494344568&_=1494730776694&deviceid=e134616960240798&sid=sueBQ3Xfey7vC3co
你能确认是因为被检测到bot了吗?有什么办法吗?谢谢!

如何获取群二维码?

请问如何获取群二维码?我查看了 Group 对象的所以方法 并没有关于二维码的。谢谢!

请问如何删除好友

api中只看到了添加好友和通过好友,如果好友数量超过5000是否就添加不上了?

消息不知道突然乱发了

今天进到服务器里看了一下,发现控制台没反应,我按了几次回车之后,消息突然乱发了,本来只有个人聊天的监听返回的消息发到群里,公众号里,只发了最近的几个有使用的。不知道是什么原因,我重启了服务,后面如果有的话我把报错的发出来。

msg.chat.accept()方法报错

你好 代码如下
@bot.register()
def print_others(msg):
logging.info(msg)

if msg.type == "Note" and "刚刚把你添加到通讯录" in msg.text:
logging.info("add new friend: " + msg.chat.nick_name)
msg.chat.send_image('new_user.jpg')
msg.chat.accept()
return

我的微信机器人账号设置的加我好友时不需要验证,所以用户添加我到通讯录之后可以直接发消息给我,然后调用msg.chat.accept()时就有报错,报错信息如下

Fri, 28 Apr 2017 11:56:45 bot.py[line:330] ERROR
An error occurred in <function print_others at 0x7f6ea15c4730>.
Traceback (most recent call last):
File "/opt/python35/lib/python3.5/site-packages/wxpy/api/bot.py", line 326, in process
ret = config.func(msg)
File "ttsbot-prod.py", line 36, in print_others
bot.accept_friend(msg.chat)
File "/opt/python35/lib/python3.5/site-packages/wxpy/api/bot.py", line 253, in accept_friend
do()
File "/opt/python35/lib/python3.5/site-packages/wxpy/utils/misc.py", line 59, in wrapped
smart_map(check_response_body, ret)
File "/opt/python35/lib/python3.5/site-packages/wxpy/utils/misc.py", line 178, in smart_map
return func(i, *args, **kwargs)
File "/opt/python35/lib/python3.5/site-packages/wxpy/utils/misc.py", line 25, in check_response_body
raise ResponseError('ret: {}; err_msg: {}'.format(ret, err_msg))
wxpy.exceptions.ResponseError: ret: -1; err_msg:

创建群组出错

from wxpy import *
bot=Bot()
bot.create_group(['ken06o',],'hello')
-------------------------------------------错误代码----------------------------------------------
Traceback (most recent call last):
File "D:/app/math/add_friend.py", line 3, in
bot.create_group(['ken06o',],'hello')
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\wxpy\api\bot.py", line 365, in create_group
raise Exception('Failed to create group:\n{}'.format(pformat(ret)))
Exception: Failed to create group:
{'BaseResponse': {'ErrMsg': '请求成功',
'RawMsg': '\n'
'1\n'
'\n'
'\n'
'30\n'
'<Title></Title>\n'
'4\n'
'0\n'
'0\n'
'\n'
'\n'
'\n',
'Ret': 0},
'BlackList': '',
'ChatRoomName': '',
'MemberCount': 0,
'MemberList': [],
'PYInitial': '',
'QuanPin': '',
'Topic': ''}

进程已结束,退出代码1

总是提示groups()没有search()方法

groupWolf = robot.groups().search('狼群')[0]
robot.register(groupWolf)
到这总会报错,提示没有search方法,改成如下:
print(robot.groups())
输出结果为[]。
改成
robot.register() print(robot.groups())
才会有内容,求修复啊

依然还是内存泄漏的问题

发送或者接收到消息后内存会增长,但是把 bot 对象销毁后,内存并没有得到释放,请问该如何处理

卡在登录后二维码那步了

大虾,首先为你创造了这么nb的项目点个赞哈……👍

然后我有个问题求教,就是登录之后返回验证码的问题

关于这个问题我尝试了以下两种方案

=================================================
1.控制台输出二维码,二维码太长了,超出屏幕了,分辨率也太低了,根本不行

2.保存二维码到指定路径,根本保存不出来,我去看了下二维码相关的代码,好像也没有保存逻辑呢

提示登录了两次,然后bot啥都获取不到

如题,如果第二次不登陆,会卡在 Please scan the QR code to log in.

Getting uuid of QR code.
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.
Login successfully as xxx
Getting uuid of QR code.
Downloading QR code.
Please scan the QR code to log in.
Please press confirm on your phone.
LOG OUT!
Loading the contact, this may take a little while.
Login successfully as xxx
>>> bot.friends()
[]
>>> ```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.