1. 部署微信
这里推荐使用docker-comspose的方式运行
1.1 安装docker-compose(以下两种均可,二选一)
先安装docker
curl -fsSL https://get.docker.com | bash
or
apt -y install docker
然后安装docker-compose
apt -y install docker-compose
or
pip3 install docker-compose
1.2 配置文件
新建docker-compose.yaml
文件,COMWECHAT
字段可以从项目处替换为最新版本
version: '3.3'
services:
wechatpchook:
container_name: comwechat
environment:
- VNCPASS=YourPassword
- COMWECHAT=https://github.com/ljc545w/ComWeChatRobot/releases/download/3.7.0.30-0.1.0-pre/3.7.0.30-0.1.0-pre.zip
volumes:
- "/root/WeChat/Files/:/home/user/.wine/drive_c/users/user/My Documents/WeChat Files/"
- "/root/WeChat/Data/:/home/user/.wine/drive_c/users/user/Application Data/"
privileged: true
network_mode: host
image: tomsnow1999/docker-com_wechat_robot:latest
1.3 启动docker镜像
docker-compose up -d
等待下载完成即可
1.4 使用VNC客户端连接进行扫码登陆操作
可以使用VNC Viewer
或者MobaXterm
,端口5905
,如果登陆之后微信报错可以重启docker即可
2.配置Slave
2.1 安装依赖
apt-get install libopus0 ffmpeg libmagic1 python3-pip git libssl-dev
pip3 install -U git+https://github.com/ehForwarderBot/efb-telegram-master.git
pip3 install -U git+https://github.com/0honus0/python-comwechatrobot-http.git
pip3 install -U git+https://github.com/0honus0/efb-wechat-comwechat-slave.git
pip3 install lottie
pip3 install cairosvg
或者从pypi下载稳定版
pip3 install efb-telegram-master
pip3 install efb-wechat-comwechat-slave
pip3 install python-comwechatrobot-http
2.2 创建配置文件
mkdir -p ~/.ehforwarderbot/profiles/ComWeChat
mkdir -p ~/.ehforwarderbot/profiles/ComWeChat/blueset.telegram
mkdir -p ~/.ehforwarderbot/profiles/ComWeChat/honus.comwechat
touch ~/.ehforwarderbot/profiles/ComWeChat/config.yaml
touch ~/.ehforwarderbot/profiles/ComWeChat/blueset.telegram/config.yaml
touch ~/.ehforwarderbot/profiles/ComWeChat/honus.comwechat/config.yaml
建好之后的文件结构如图所示
ComWeChat/
├── blueset.telegram
│ ├── config.yaml
├── config.yaml
└── honus.comwechat
└── config.yaml
2.3 主端配置文件
点击跳转 与之前配置相同,可以直接跳转查看
2.4 从端配置文件
编辑 /.ehforwarderbot/profiles/ComWeChat/honus.comwechat/config.yaml
dir: "/root/WeChat/Files/"
3. 启动EFB
ehforwarderbot -p ComWeChat
48 条评论
师傅好, comwechat在vnc里提示版本过低了, 之前登录过的机器没问题, 但是我今天迁移的时候发现已经版本过低无法登陆了
启动报这个错Traceback (most recent call last):
sys.exit(main())File "/usr/local/bin/ehforwarderbot", line 8, in
File "/usr/local/lib/python3.9/dist-packages/ehforwarderbot/__main__.py", line 330, in main
conf = config.load_config()File "/usr/local/lib/python3.9/dist-packages/ehforwarderbot/config.py", line 61, in load_config
raise ValueError(_("\"{}\" is not found.").format(i))ValueError: "honus.CuteCatiHttp" is not found.
发送animated_stickers时出现以下报错
2023-08-22 00:22:33,537 - comwechat - DEBUG - system_msg:{'sender': 'filehelper', 'message': '发送失败,请在手机端确认'}
该怎么解决呢?
启动后报这个错误
启动efb-slave的时候提示找不到18888端口,这个怎么解决啊
Traceback (most recent call last):
load_entry_point('ehforwarderbot==2.1.1', 'console_scripts', 'ehforwarderbotFile "/home/ubuntu/.local/bin/ehforwarderbot", line 11, in
')()
init(conf)File "/home/ubuntu/.local/lib/python3.8/site-packages/ehforwarderbot/__main__.
py", line 335, in main
File "/home/ubuntu/.local/lib/python3.8/site-packages/ehforwarderbot/__main__.
coordinator.add_channel(cls(instance_id=instance_id))py", line 135, in init
File "/home/ubuntu/.local/lib/python3.8/site-packages/efb_wechat_comwechat_sla
self.wxid = self.bot.GetSelfInfo()["data"]["wxId"]ve/ComWechat.py", line 67, in init
File "/home/ubuntu/.local/lib/python3.8/site-packages/wechatrobot/Api.py", lin
return self.post(WECHAT_GET_SELF_INFO , GetSelfInfoBody(**params))e 16, in GetSelfInfo
File "/home/ubuntu/.local/lib/python3.8/site-packages/wechatrobot/Api.py", lin
return json.loads(requests.post( f"http://127.0.0.1:{self.port}/api/?type={te 231, in post
ype}", data = params.json()).content.decode("utf-8"),strict=False)
return request('post', url, data=data, json=json, **kwargs)File "/usr/lib/python3/dist-packages/requests/api.py", line 116, in post
File "/usr/lib/python3/dist-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in reque
resp = self.send(prep, **send_kwargs)st
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)File "/usr/lib/python3/dist-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=1
8888): Max retries exceeded with url: /api/?type=1 (Caused by NewConnectionError
('<urllib3.connection.HTTPConnection object at 0x7fc289d937c0>: Failed to establ
ish a new connection: [Errno 111] Connection refused'))
微信docker启动没成功或者没登录微信
没有撤回功能
因为hook那里没做这个功能
hook的github地址是什么
https://www.showdoc.com.cn/WeChatProject/9276717940750694 hook作者更新了主动撤回
不是一个项目
https://github.com/ljc545w/ComWeChatRobot
能否将静态贴纸转为微信的表情
现在可以发送啊,这个转换是指
现在只能转换成微信的图片OωO
可以先保存图片再添加到表情?
是这样的,也不知道怎么转换成表情
https://github.com/zhangyile/telegram-wechat.git 可以参考这个,作者实现了这个功能
请问下,能弄个可以装在群晖上的docker吗
群晖架构是amd的话应该能直接用吧,没用过群晖
那能提供下dockerfile文件吗,我自己研究研究
https://github.com/ehForwarderBot/efb-wechat-comwechat-slave/blob/master/Dockerfile
https://github.com/tom-snow/docker-ComWechat/blob/main/Dockerfile
感谢
你成功设置了吗?我这里群晖的docker里一直没办法成功唤起微信
并没有,不会弄啊
启动docker镜像后出现 dockerExited (1) 3 seconds ago
|´・ω・)ノ请问docker占用内存大么。我的vps还剩1G不知道够不(/ω\)
推荐4g
(╯°A°)╯︵○○○那GG了
请问大佬这种方法和可爱猫的方法哪种微信能在线的时间长
用的是桌面微信,只要不主动关掉还是比较稳定的
我卡在1.2配置文件那,docker对于我们这些小白很吃力
docker已经很方便了
方便教一下怎么配置吗
这篇文章就是教程啊
在第1.2步配置文件那不会了,因为不知道上哪去配置文件
新建一个 docker-compose.yaml
在根目录新建一个吗,你回消息的速度爱了呀
随便一个位置,这个是启动docker的配置
好的,非常感谢,下午试试
这个方法网页版不能登录的是不是也可以用了
是的
可以都打包到docker运行吗?
可以的,git已经有镜像了,可以自己配置下
镜像具体名字是哪个,找了感觉很多旧项目,不太像
honus/efb-wechat-comwechat-slave:latest
docker启动需要什么环境变量参数吗,我这里报错Traceback (most recent call last):
sys.exit(main()) ^^^^^^File "/app/venv/bin/ehforwarderbot", line 8, in
File "/app/venv/lib/python3.11/site-packages/ehforwarderbot/__main__.py", line 335, in main
init(conf)File "/app/venv/lib/python3.11/site-packages/ehforwarderbot/__main__.py", line 135, in init
coordinator.add_channel(cls(instance_id=instance_id)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/app/venv/lib/python3.11/site-packages/efb_wechat_comwechat_slave/ComWechat.py", line 66, in init
self.dir = self.config["dir"] ~~~~~~~~~~~^^^^^^^TypeError: 'NoneType' object is not subscriptable
配置文件没写