valord577 / auto_add_wechat_friends_py

微信添加好友 批量发送添加请求 脚本 python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

微信7.0运行到一半,遇到一个问题(不知道还在不在维护)

LatreviousYI opened this issue · comments

UI hierchary dumped to: /sdcard/dump.xml
/sdcard/dump.xml: 1 file pulled. 8.4 MB/s (48276 bytes in 0.005s)
[{'index': '1', 'text': '通讯录', 'resource-id': 'com.tencent.mm:id/d7b', 'class': 'android.widget.TextView', 'package': 'com.tencent.mm', 'content-desc': '', 'checkable': 'false', 'checked': 'false', 'clickable': 'false', 'enabled': 'true', 'focusable': 'false', 'focused': 'false', 'scrollable': 'false', 'long-clickable': 'false', 'password': 'false', 'selected': 'false', 'bounds': '[234,1311][306,1344]'}]
UI hierchary dumped to: /sdcard/dump.xml
/sdcard/dump.xml: 1 file pulled. 10.1 MB/s (40386 bytes in 0.004s)
[{'index': '0', 'text': '新的朋友', 'resource-id': '', 'class': 'android.widget.TextView', 'package': 'com.tencent.mm', 'content-desc': '', 'checkable': 'false', 'checked': 'false', 'clickable': 'false', 'enabled': 'true', 'focusable': 'false', 'focused': 'false', 'scrollable': 'false', 'long-clickable': 'false', 'password': 'false', 'selected': 'false', 'bounds': '[144,176][312,222]'}]
UI hierchary dumped to: /sdcard/dump.xml
/sdcard/dump.xml: 1 file pulled. 6.0 MB/s (10009 bytes in 0.002s)
[{'index': '0', 'text': '添加朋友', 'resource-id': 'com.tencent.mm:id/jw', 'class': 'android.widget.TextView', 'package': 'com.tencent.mm', 'content-desc': '', 'checkable': 'false', 'checked': 'false', 'clickable': 'true', 'enabled': 'true', 'focusable': 'true', 'focused': 'false', 'scrollable': 'false', 'long-clickable': 'true', 'password': 'false', 'selected': 'false', 'bounds': '[520,48][720,144]'}]
UI hierchary dumped to: /sdcard/dump.xml
/sdcard/dump.xml: 1 file pulled. 9.4 MB/s (31894 bytes in 0.003s)
[{'index': '1', 'text': '微信号/QQ号/手机号', 'resource-id': 'com.tencent.mm:id/d85', 'class': 'android.widget.TextView', 'package': 'com.tencent.mm', 'content-desc': '', 'checkable': 'false', 'checked': 'false', 'clickable': 'false', 'enabled': 'true', 'focusable': 'false', 'focused': 'false', 'scrollable': 'false', 'long-clickable': 'false', 'password': 'false', 'selected': 'false', 'bounds': '[32,189][688,251]'}]
===== 开始查找 ===== 13029620003 =====
UI hierchary dumped to: /sdcard/dump.xml
/sdcard/dump.xml: 1 file pulled. 2.7 MB/s (6852 bytes in 0.002s)
[{'index': '0', 'text': '微信号/QQ号/手机号', 'resource-id': 'com.tencent.mm:id/kh', 'class': 'android.widget.EditText', 'package': 'com.tencent.mm', 'content-desc': '', 'checkable': 'false', 'checked': 'false', 'clickable': 'true', 'enabled': 'true', 'focusable': 'true', 'focused': 'true', 'scrollable': 'false', 'long-clickable': 'true', 'password': 'false', 'selected': 'false', 'bounds': '[80,73][704,119]'}]
UI hierchary dumped to: /sdcard/dump.xml
/sdcard/dump.xml: 1 file pulled. 5.2 MB/s (8896 bytes in 0.002s)
[{'index': '1', 'text': '搜索:13029620003', 'resource-id': 'com.tencent.mm:id/mf', 'class': 'android.widget.TextView', 'package': 'com.tencent.mm', 'content-desc': '', 'checkable': 'false', 'checked': 'false', 'clickable': 'false', 'enabled': 'true', 'focusable': 'false', 'focused': 'false', 'scrollable': 'false', 'long-clickable': 'false', 'password': 'false', 'selected': 'false', 'bounds': '[160,185][720,231]'}]
==> 点击搜索 ==>
UI hierchary dumped to: /sdcard/dump.xml
/sdcard/dump.xml: 1 file pulled. 6.2 MB/s (21502 bytes in 0.003s)
UI hierchary dumped to: /sdcard/dump.xml
/sdcard/dump.xml: 1 file pulled. 7.1 MB/s (21502 bytes in 0.003s)
[{'NAF': 'true', 'index': '1', 'text': '', 'resource-id': 'com.tencent.mm:id/b3t', 'class': 'android.widget.ImageView', 'package': 'com.tencent.mm', 'content-desc': '', 'checkable': 'false', 'checked': 'false', 'clickable': 'true', 'enabled': 'true', 'focusable': 'true', 'focused': 'false', 'scrollable': 'false', 'long-clickable': 'false', 'password': 'false', 'selected': 'false', 'bounds': '[0,224][720,352]'}]
Traceback (most recent call last):
File "run.py", line 90, in
run(sys.argv[1:])
File "run.py", line 43, in run
fun.main()
File "/home/kerwin/桌面/auto_add_wechat/main.py", line 203, in main
self.add_friends(str(line))
File "/home/kerwin/桌面/auto_add_wechat/main.py", line 190, in add_friends
self._adb.click(1)
File "/home/kerwin/桌面/auto_add_wechat/adb.py", line 121, in click
self.cal_coordinate(cal_index)
File "/home/kerwin/桌面/auto_add_wechat/adb.py", line 106, in cal_coordinate
_bounds = self._nodes[_index]['bounds']
IndexError: list index out of range

运行到添加到通讯录页面

commented

你在使用这个脚本的时候,添加一个好友之后,返回动输入电话号码的页面,清空已输入的号码这个能正常运行吗?

还没到这一步,就是还没点击添加到通讯录之前一步就报错了

commented

这个脚本之前好像是为企业微信写的,所以我们需要改一点点代码,让这个脚本支持个人版微信

这个我知道,我也改过一点点代码,我到时候自己研究一下吧

@kerwinLV
你改好能用吗?为什么我改了之后一直卡在新的朋友那里报错啊?

需要改改步骤,新版微信界面调整了