Ai
1 Star 0 Fork 0

python/wechat

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
clear_fans.py 1.90 KB
一键复制 编辑 原始数据 按行查看 历史
Yung 提交于 2022-07-19 18:15 +08:00 . 添加应用
import itchat
import time
desired_capabilities = {
'platformName': 'Android', # 操作系统
'deviceName': '2a254a02', # 设备 ID,使用 cmd 中 adb devices 命令得到
'platformVersion': '10.0.10', # 设备版本号,在手机设置中查看
'appPackage': 'com.tencent.mm', # app 包名
'appActivity': 'com.tencent.mm.ui.LauncherUI', # app 启动时主 Activity
'noReset': True # 是否保留 session 信息 避免重新登录
}
driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_capabilities)
print('微信启动')
exit(0)
itchat.auto_login() # 热加载
itchat.send("ॣ ॣ ॣ", toUserName='filehelper')
exit(0)
print('检测结果可能会引起不适。')
print('检测结果请在手机上查看,此处仅显示检测信息。')
print('消息被拒收为被拉黑, 需要发送验证信息为被删。')
print('没有结果就是好结果。')
print('检测1000位好友需要34分钟, 以此类推。')
print('为了你的账号安全着想,这个速度刚好。')
print('在程序运行期间请让程序保持运行,网络保持连接。')
print('请不要从手机端手动退出。')
input('按ENTER键继续...')
friends = itchat.get_friends(update=True)
lenght = len(friends)
for i in range(1, lenght):
# 微信bug,用自己账户给所有好友发送"ॣ ॣ ॣ"消息,当添加自己为好友时,只有自己能收到此信息,如果没添加自己为好友\
# 没有人能收到此信息,笔者此刻日期为2019/1/6 8:30,到目前为止微信bug还没修复。
# 所以迭代从除去自己后的第二位好友开始 range(1, lenght)。
itchat.send("జ్ఞా", toUserName=friends[i]['UserName'])
print(f'检测到第{i}位好友: {str(friends[i]["NickName"]).center(20, " ")}')
# 发送信息速度过快会被微信检测到异常行为。
time.sleep(2)
print('已检测完毕,请在手机端查看结果。')
itchat.run()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xyrit-python-project/wechat.git
git@gitee.com:xyrit-python-project/wechat.git
xyrit-python-project
wechat
wechat
master

搜索帮助