Rat's

使用EH Forwarder Bot实现Telegram同时收发多个微信/QQ消息
说明:EH Forwarder Bot是一个可扩展的聊天隧道框架,允许用户一次发送和接收来自多个IM平台的消息,并...
扫描右侧二维码阅读全文
19
2019/04

使用EH Forwarder Bot实现Telegram同时收发多个微信/QQ消息

说明:EH Forwarder Bot是一个可扩展的聊天隧道框架,允许用户一次发送和接收来自多个IM平台的消息,并最终远程管理他们的帐户,目前可以实现的Telegram收发QQ、微信、Facebook Messenger等消息,你也可以同时一起收发N个微信、NQQ等,这里就说下Telegram收发微信/QQ消息的手动安装及Docker安装。

收发微信

提示:使用该功能前,请先确认所使用的微信能成功登录WEB端,不然后面会报错。

项目地址:https://github.com/blueset/ehForwarderBot

所使用的模块地址:

#Telegram模块
https://github.com/blueset/efb-telegram-master
#微信模块
https://github.com/blueset/efb-wechat-slave

其他模块地址→传送门,包括Facebook Messenger等模块,有兴趣的可以看下。

环境要求:Python 3.6+EH Forwarder Bot 2.0+ffmpeglibmagiclibwebp

手动教程适用于DebianCentOSUbuntu,如果你想用Ubuntu的话,最好使用18.04+版本。

1、安装依赖

#CentOS系统
yum install file-devel libwebp-tools git screen -y

#Debian/Ubuntu系统
apt install libwebp-dev libmagic-dev git screen -y

2、安装Python3.6

#CentOS系统
wget https://www.moerats.com/usr/shell/Python3/CentOS_Python3.6.sh && sh CentOS_Python3.6.sh
#Debian系统
wget https://www.moerats.com/usr/shell/Python3/Debian_Python3.6.sh && sh Debian_Python3.6.sh
#Ubuntu系统
apt update
apt install python3-pip python3-setuptools python3-dev -y

3、安装ffmpeg

#下载ffmpeg二进制
wget https://www.moerats.com/usr/down/ffmpeg/ffmpeg-git-$(getconf LONG_BIT)bit-static.tar.xz
#解压文件
tar xvf ffmpeg-git-*-static.tar.xz
#移动ffmpeg可执行文件
mv ffmpeg-git-*/ffmpeg  ffmpeg-git-*/ffprobe /usr/bin/
#删除文件
rm -rf ffmpeg-git-*

4、安装框架

#安装稳定版
pip3 install ehforwarderbot

#安装开发版,建议安装开发版,bug修复快些,功能也新
pip3 install git+https://github.com/blueset/ehforwarderbot.git

5、安装TG和微信模块

pip3 install efb-telegram-master efb-wechat-slave

6、启用模块
先新建配置文件夹和配置文件config.yaml,使用命令:

#default为配置文件默认的文件夹,你也可以命名为其它的,不会玩的就默认
mkdir -p ~/.ehforwarderbot/profiles/default
nano ~/.ehforwarderbot/profiles/default/config.yaml

参考代码为:

#请根据实际情况修改
master_channel: foo.demo_master
slave_channels:
- foo.demo_slave
- bar.dummy
middlewares:
- foo.null

以上对应的均为模块名称,模块参考→传送门,比如这里博主只用了TelegramWeChat模块,所以大致配置为:

master_channel: blueset.telegram
slave_channels:
- blueset.wechat

然后使用Ctrl+xy保存退出。

这只是登录一个微信号,如果你要同时登录多个微信号,那么配置文件就需要改为:

#比如我要同时登录并收发3个微信号
master_channel: blueset.telegram
slave_channels:
- blueset.wechat
- blueset.wechat#moe123
- blueset.wechat#rats321

只需要在后面使用#指定一个ID号,该ID号只能有字母,数字和下划线,即正则表达式[a-zA-Z0-9_]+,想登录几个账户就加几个。如果你使用QQFacebook Messenger模块的话,设置方法也一样。

7、建立TG配置文件
建立配置文件前需要先获取TelegramTokenUserid,获取方法如下:

#Telegram的Token获取
1、在Telegram关注@BotFather
2、再到对话框依次输入:/start=>/newbot,然后会要你给机器人命名(如:MoeratsBot),命名完成会给你一个Token。

#Telegram群Userid获取
1、先和你的机器人聊天,随便发一句话。
2、在浏览器输入https://api.telegram.org/botxx:xx/getUpdates(其中xx:xx为Token),然后chat后面的id即为你的userid。

再新建一个Telegram模块配置文件夹和配置文件config.yaml,使用命令:

#同样的也建在default文件夹,如果你上面更改了default文件夹,那这里也要更改
mkdir ~/.ehforwarderbot/profiles/default/blueset.telegram
nano ~/.ehforwarderbot/profiles/default/blueset.telegram/config.yaml

填入以下代码:

token: "12345:moerats" 
admins:
- 765432 

然后使用Ctrl+xy保存退出。上面所对应的参数分别为TokenUserid。关于Telegram模块的更多玩法可以参考→传送门

8、启动

#该命令会默认从default文件夹读取信息,如果你之前建的是moerats文件夹,那命令应该为ehforwarderbot -p moerats
ehforwarderbot

这时候会给一个微信二维码或者二维码链接你,放到浏览器打开扫描登录即可,如果你设置了同时登录多个账户,那设置几个就需要登录几个。

然后使用Ctrl+C断开运行,再使用命令后台运行:

screen -dmS EHF ehforwarderbot

最后你的微信消息会通过机器人发送给你,你也可以通过机器人将消息发送给指定好友。

收发QQ消息

提示:这里随便提了下,了解下就行了,建议使用下面Docker方式安装。

所使用的模块地址:

#Telegram模块
https://github.com/blueset/efb-telegram-master
#QQ模块
https://github.com/milkice233/efb-qq-slave

由于方法写的很大概,所以需要你把收发微信的方法看懂,这里EH Forwarder Bot只支持酷Q客户端,一般采用Docker的方法在Linux上安装酷Q,方法很久以前就说过了,参考→传送门,不过启动命令变了下,也就是安装wine-coolq的命令。

安装TGQQ模块:

pip3 install efb-telegram-master efb-qq-slave

安装wine-coolq

mkdir coolq  #包含CoolQ程序文件
docker run -ti --rm --name cqhttp-test --net="host" \
     -v $(pwd)/coolq:/home/user/coolq     `#mount coolq folder` \
     -p 9000:9000                         `#网页noVNC端口` \
     -p 5700:5700                         `#酷Q对外提供的API接口的端口` \
     -e VNC_PASSWD=MAX8char               `#请修改VNC密码!!!!` \
     -e COOLQ_PORT=5700                   `#酷Q对外提供的API接口的端口` \
     -e COOLQ_ACCOUNT=123456              `#在此输入要登录的QQ号,虽然可选但是建议填入` \
     -e CQHTTP_POST_URL=http://127.0.0.1:8000   `#efb-qq-slave监听的端口/地址用于接受传入的消息` \
     -e CQHTTP_SERVE_DATA_FILES=yes       `#允许以HTTP方式访问酷Q数据文件` \
     -e CQHTTP_ACCESS_TOKEN=ac0f790e1fb74ebcaf45da77a6f9de47  `#Access Token` \
     -e CQHTTP_POST_MESSAGE_FORMAT=array  `# 回传消息时使用数组(必选)` \
     richardchien/cqhttp:latest

然后使用ip:9000访问noVNC登录酷Q即可。

新建QQ模块配置文件:

mkdir ~/.ehforwarderbot/profiles/default/milkice.qq
nano ~/.ehforwarderbot/profiles/default/milkice.qq/config.yaml

填入的代码大致如下:

Client: CoolQ                         #指定要使用的QQ客户端(此处为CoolQ)
CoolQ:
    type: HTTP                        #指定efb-qq-slave与酷Q通信的方式 现阶段仅支持HTTP
    access_token: ac0f790e1fb74ebcaf45da77a6f9de47
    api_root: http://127.0.0.1:5700/  # 酷Q API接口地址/端口
    host: 127.0.0.1                   # efb-qq-slave所监听的地址用于接收消息
    port: 8000                        # 同上
    is_pro: false                      # 若为酷Q Pro则为true,反之为false
    air_option:                       # 包含于air_option的配置选项仅当is_pro为false时才有效
        upload_to_smms: true          # 将来自EFB主端(通常是Telegram) 的图片上传到sm.ms服务器并以链接的形式发送到QQ端

最后使用ehforwarderbot命令启动即可。

Docker安装

这里选择2个最新的Docker镜像,也是官方推荐的,项目地址:

#Telegram收发QQ消息
https://github.com/Earth-Online/efb-qq-coolq-docker
#Telegram收发微信消息
https://www.github.com/Mikubill/efb-wechat-docker

1、安装Docker

#CentOS 6
rpm -iUvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum update -y
yum -y install docker-io
service docker start
chkconfig docker on

#CentOS 7、Debian、Ubuntu
curl -sSL https://get.docker.com/ | sh
systemctl start docker
systemctl enable docker

2、Telegram收发QQ消息
安装docker-compose

curl -L https://github.com/docker/compose/releases/download/1.25.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
#验证是否安装成功
docker-compose --version
#返回以下信息即安装成功
docker-compose version 1.25.0, build 1110ad01

拉取Docker源码:

git clone https://github.com/Earth-Online/efb-qq-coolq-docker.git
cd efb-qq-coolq-docker
#编辑config.yaml配置文件
nano ehforward_config/profiles/default/blueset.telegram/config.yaml

修改如下:

#token和userid参数获取方法查看上面的手动安装教程
token: "你的TG机器人Token"
admins:
- 你的Userid

然后再编辑docker-compose.yml文件:

nano docker-compose.yml

修改如下:

- VNC_PASSWD=你的密码
- COOLQ_ACCOUNT=你的qq账号

后台启动:

#第一次启动会构建镜像,所以会慢点
docker-compose up -d

然后打开ip:9801登陆novnc后完成coolq登陆操作。如果该地址打不开,请检查下防火墙。

3、Telegram收发微信消息

#拉取源码
git clone https://github.com/mikubill/efb-wechat-docker.git
#构建镜像
cd efb-wechat-docker && docker build -t mikubill/efbwechat .
#启动镜像,TOKEN为TG机器人Token、ADMIN为你的Userid,获取方法查看上面的手动安装教程
docker run -d -t --name "efbwechat" -e TOKEN=xxxx -e ADMIN=xxxx mikubill/efbwechat

最后获取微信登录验证码,使用命令:

docker logs -f efbwechat 

扫描登录即可。

最后这里都没有给微信添加额外的配置文件,直接使用默认的微信配置,如果想扩展微信功能的可以参考→传送门,不过由于模块使用的微信网页版,所以支持的功能是有限的,比如:没有朋友圈、不能发语音、位置等等,一般来说也够用了,至于QQ的话,功能肯定受酷Q限制,暂时不能处理好友请求处理,加群请求处理,语音发送/接收等,对于Facebook Messenger模块的话,有需求的可以自己试试安装配置。

Vultr新用户注册送100美元/16个机房按小时计费,支持支付宝,【点击查看】。
最后修改:2020 年 02 月 23 日 10 : 26 AM

发表评论

123 条评论

  1. xushbo

    扫完二维码出现了
    Traceback (most recent call last):
    File "/usr/local/bin/ehforwarderbot", line 11, in <module>

    load_entry_point('ehforwarderbot==2.0.0b21', 'console_scripts', 'ehforwarderbot')()

    File "/usr/local/lib/python3.6/site-packages/ehforwarderbot/__main__.py", line 271, in main

    init(conf)

    File "/usr/local/lib/python3.6/site-packages/ehforwarderbot/__main__.py", line 91, in init

    coordinator.add_channel(cls(instance_id=instance_id))

    File "/usr/local/lib/python3.6/site-packages/efb_wechat_slave/__init__.py", line 152, in init

    self.authenticate('console_qr_code')

    File "/usr/local/lib/python3.6/site-packages/efb_wechat_slave/__init__.py", line 544, in authenticate

    logout_callback=self.exit_callback)

    File "/usr/local/lib/python3.6/site-packages/efb_wechat_slave/vendor/wxpy/api/bot.py", line 97, in init

    enhance_webwx_request(self)

    File "/usr/local/lib/python3.6/site-packages/efb_wechat_slave/vendor/wxpy/utils/misc.py", line 327, in enhance_webwx_request

    '&pass_ticket={li[pass_ticket]}'.format(li=login_info)

    KeyError: 'wxsid'

    1. 陈q
      @xushbo

      你这个问题解决了,我也是出现同样问题

    2. xushbo
      @xushbo

      怎么整都整不好,一直出现<error><ret>1203</ret><message>为了你的帐号安全,此微信号不能登录网页微信。你可以使用Windows微信或Mac微信在电脑端登录。Windows微信下载地址:https://pc.weixin.qq.com Mac微信下载地址:https://mac.weixin.qq.com</message></error>
      2019-11-15 06:46:29,584 [Level 99]: plugins.blueset.wechat.WeChatChannel (__init__.console_qr_code; __init__.py:207)

      EWS: Please scan the QR code with your camera, screenshots will not work. (oedZSPgaFg==, 400)

      1. cc
        @xushbo

        这种本来就不能登, 微信的限制.

  2. tang

    大佬,第二次登录的时候,微信扫码成功之后,bot说login again when you are ready,相当于扫完码后没登进去,

    Traceback (most recent call last):
    File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner

    self.run()

    File "/usr/lib/python3.6/threading.py", line 864, in run

    self._target(*self._args, **self._kwargs)

    File "/home/wiki/.local/lib/python3.6/site-packages/efb_wechat_slave/vendor/itchat/components/login.py", line 295, in maintain_loop

    exitCallback()

    File "/home/wiki/.local/lib/python3.6/site-packages/efb_wechat_slave/__init__.py", line 244, in exit_callback

    raise Exception(self._("Web WeChat logged your account out before master channel is ready."))

    Exception: Web WeChat logged your account out before master channel is ready.

    1. tang
      @tang

      ok 已在此issue中 找到问题和方法,https://github.com/blueset/efb-wechat-slave/issues/61

      rm -r ~/.ehforwarderbot/profiles/default/blueset.w*

  3. xushbo

    <error><ret>1203</ret><message>为了你的帐号安全,此微信号不能登录网页微信。你可以使用Windows微信或Mac微信在电脑端登录。Windows微信下载地址:https://pc.weixin.qq.com Mac微信下载地址:https://mac.weixin.qq.com</message></error>
    2019-11-15 06:46:29,584 [Level 99]: plugins.blueset.wechat.WeChatChannel (__init__.console_qr_code; __init__.py:207)

    EWS: Please scan the QR code with your camera, screenshots will not work. (oedZSPgaFg==, 400)

    好不容易弄好了 出现这个情况

    1. Rat's
      @xushbo

      这个要你直接扫描二维码,不要扫描截图的翻译

  4. xushbo

    大佬最后一步了,出现这个问题
    Traceback (most recent call last):
    File "/usr/local/bin/ehforwarderbot", line 11, in <module>

    sys.exit(main())

    File "/usr/local/lib/python3.6/site-packages/ehforwarderbot/__main__.py", line 262, in main

    conf = config.load_config()

    File "/usr/local/lib/python3.6/site-packages/ehforwarderbot/config.py", line 47, in load_config

    channel = utils.locate_module(data['master_channel'], 'master')

    File "/usr/local/lib/python3.6/site-packages/ehforwarderbot/utils.py", line 138, in locate_module

    return i.load()

    File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2442, in load

    self.require(*args, **kwargs)

    File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2465, in require

    items = working_set.resolve(reqs, env, installer, extras=self.extras)

    File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 786, in resolve

    raise DistributionNotFound(req, requirers)

    pkg_resources.DistributionNotFound: The 'cairocffi' distribution was not found and is required by cairosvg

    1. Rat's
      @xushbo

      看报错好像是cairocffi没安装,试试这个命令看看pip3 install cairocffi

  5. 你好,跪求帮忙啊
    conf = config.load_config()

    File "/usr/local/lib/python3.6/site-packages/ehforwarderbot/config.py", line 47, in load_config

    channel = utils.locate_module(data['master_channel'], 'master')

    File "/usr/local/lib/python3.6/site-packages/ehforwarderbot/utils.py", line 138, in locate_module

    return i.load()

    File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2346, in load

    return self.resolve()

    File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2352, in resolve

    module = __import__(self.module_name, fromlist=['__name__'], level=0)

    File "/usr/local/lib/python3.6/site-packages/efb_telegram_master/__init__.py", line 28, in <module>

    from . import utils as etm_utils

    File "/usr/local/lib/python3.6/site-packages/efb_telegram_master/utils.py", line 10, in <module>

    from tgs.parsers.tgs import parse_tgs

    File "/usr/local/lib/python3.6/site-packages/tgs/__init__.py", line 1, in <module>

    from . import objects, parsers, utils, exporters, nvector

    File "/usr/local/lib/python3.6/site-packages/tgs/parsers/__init__.py", line 1, in <module>

    from . import svg, tgs, sif

    File "/usr/local/lib/python3.6/site-packages/tgs/parsers/svg/__init__.py", line 1, in <module>

    from .importer import parse_svg_etree, parse_svg_file

    File "/usr/local/lib/python3.6/site-packages/tgs/parsers/svg/importer.py", line 8, in <module>

    from ...utils.ellipse import Ellipse

    File "/usr/local/lib/python3.6/site-packages/tgs/utils/__init__.py", line 1, in <module>

    from . import animation, ellipse, ik, linediff, restructure, script, stripper

    File "/usr/local/lib/python3.6/site-packages/tgs/utils/linediff.py", line 3, in <module>

    from ..exporters import prettyprint

    File "/usr/local/lib/python3.6/site-packages/tgs/exporters/__init__.py", line 16, in <module>

    from . import cairo, gif

    File "/usr/local/lib/python3.6/site-packages/tgs/exporters/cairo.py", line 1, in <module>

    import cairosvg

    File "/usr/local/lib/python3.6/site-packages/cairosvg/__init__.py", line 42, in <module>

    from . import surface # noqa isort:skip

    File "/usr/local/lib/python3.6/site-packages/cairosvg/surface.py", line 25, in <module>

    import cairocffi as cairo

    File "/usr/local/lib/python3.6/site-packages/cairocffi/__init__.py", line 50, in <module>

    ('libcairo.so', 'libcairo.2.dylib', 'libcairo-2.dll'))

    File "/usr/local/lib/python3.6/site-packages/cairocffi/__init__.py", line 45, in dlopen

    raise OSError(error_message) # pragma: no cover

    OSError: no library called "cairo" was found
    no library called "libcairo-2" was found
    cannot load library 'libcairo.so': Error loading shared library libcairo.so: No such file or directory
    cannot load library 'libcairo.2.dylib': Error loading shared library libcairo.2.dylib: No such file or directory
    cannot load library 'libcairo-2.dll': Error loading shared library libcairo-2.dll: No such file or directory

    1. 你好,跪求帮忙啊
      @你好,跪求帮忙啊

      请问这咋办啊?

      1. 你好,跪求帮忙啊
        @你好,跪求帮忙啊

        现在出现扫码界面了 可为什么 扫码登录后 不转发消息呢?

        1. Rat's
          @你好,跪求帮忙啊

          有日志信息吗?

          1. 你好,跪求帮忙啊
            @Rat's

            If you cannot read the QR code above, please visit the following URL:
            https://login.weixin.qq.com/qrcode/Qbz7VT31zQ==
            14-10-2019:14:06:23,434 CRITICAL [main.py:86]

            Slave channel WeChat Slave (eh_wechat_slave) initialized.

            14-10-2019:14:06:23,435 CRITICAL [main.py:87]

            Initializing master ('plugins.eh_telegram_master', 'TelegramChannel')...

            Imageio: 'ffmpeg-linux64-v3.3.1' was not found on your computer; downloading it now.
            Try 1. Download from https://github.com/imageio/imageio-binaries/raw/master/ffmpeg/ffmpeg-linux64-v3.3.1 (43.8 MB)
            Downloading: 45929032/45929032 bytes (100.0%)
            Done
            14-10-2019:14:06:32,452 CRITICAL [main.py:90]

            Master channel Telegram Master (eh_telegram_master) initialized.

            14-10-2019:14:06:32,452 CRITICAL [main.py:92]

            All channels initialized.

            File saved as /root/.imageio/ffmpeg/ffmpeg-linux64-v3.3.1.

            1. Rat's
              @你好,跪求帮忙啊

              这个提示是说你没安装ffmpeg。

              1. 你好,跪求帮忙啊
                @Rat's

                楼主 现在你的dock安装教程 还有用吗? 我用的别的教程安装的dock 最后出现二维码了 可机器人就是不转发消息

                1. Rat's
                  @你好,跪求帮忙啊

                  一般能打开就么得问题,有空我再实践一下。

  6. tabris

    VPS 不再墙外 没有关系的吧?

    1. Rat's
      @tabris

      这个需要墙外的vps

  7. Adoc

    您好,博主,可以绑定多个微信号,绑定多个机器人吗

    1. Rat's
      @Adoc

      可以绑定多个微信

  8. stardif

    Traceback (most recent call last):
    File "/usr/local/bin/ehforwarderbot", line 10, in <module>

    sys.exit(main())

    File "/usr/local/lib/python3.7/site-packages/ehforwarderbot/__main__.py", line 267, in main

    init(conf)

    File "/usr/local/lib/python3.7/site-packages/ehforwarderbot/__main__.py", line 91, in init

    coordinator.add_channel(cls(instance_id=instance_id))

    File "/usr/local/lib/python3.7/site-packages/efb_wechat_slave/__init__.py", line 174, in init

    self.authenticate('console_qr_code')

    File "/usr/local/lib/python3.7/site-packages/efb_wechat_slave/__init__.py", line 553, in authenticate

    logout_callback=self.exit_callback)

    File "/usr/local/lib/python3.7/site-packages/efb_wechat_slave/wxpy/api/bot.py", line 97, in init

    enhance_webwx_request(self)

    File "/usr/local/lib/python3.7/site-packages/efb_wechat_slave/wxpy/utils/misc.py", line 327, in enhance_webwx_request

    '&pass_ticket={li[pass_ticket]}'.format(li=login_info)

    KeyError: 'wxsid'
    2019-08-03 22:19:16,671 [Level 99]: ehforwarderbot.__main__ (__main__.init; __main__.py:85)

    Initializing slave blueset.wechat...

    Traceback (most recent call last):
    File "/usr/local/bin/ehforwarderbot", line 10, in <module>

    sys.exit(main())

    File "/usr/local/lib/python3.7/site-packages/ehforwarderbot/__main__.py", line 267, in main

    init(conf)

    File "/usr/local/lib/python3.7/site-packages/ehforwarderbot/__main__.py", line 91, in init

    coordinator.add_channel(cls(instance_id=instance_id))

    File "/usr/local/lib/python3.7/site-packages/efb_wechat_slave/__init__.py", line 174, in init

    self.authenticate('console_qr_code')

    File "/usr/local/lib/python3.7/site-packages/efb_wechat_slave/__init__.py", line 553, in authenticate

    logout_callback=self.exit_callback)

    File "/usr/local/lib/python3.7/site-packages/efb_wechat_slave/wxpy/api/bot.py", line 87, in init

    loginCallback=login_callback, exitCallback=logout_callback

    File "/usr/local/lib/python3.7/site-packages/itchat/components/register.py", line 29, in auto_login

    loginCallback=loginCallback, exitCallback=exitCallback):

    File "/usr/local/lib/python3.7/site-packages/itchat/components/hotreload.py", line 54, in load_login_status

    self.loginInfo['User'] = templates.User(self.loginInfo['User'])

    KeyError: 'User'

    请问这是哪里有问题?

    1. Lison
      @stardif

      Traceback (most recent call last):
      File "/usr/local/bin/ehforwarderbot", line 11, in <module>

      sys.exit(main())

      File "/usr/local/lib/python3.6/site-packages/ehforwarderbot/__main__.py", line 262, in main

      conf = config.load_config()

      File "/usr/local/lib/python3.6/site-packages/ehforwarderbot/config.py", line 47, in load_config

      channel = utils.locate_module(data['master_channel'], 'master')

      File "/usr/local/lib/python3.6/site-packages/ehforwarderbot/utils.py", line 138, in locate_module

      return i.load()

      File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2443, in load

      return self.resolve()

      File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2449, in resolve

      module = __import__(self.module_name, fromlist=['__name__'], level=0)

      File "/usr/local/lib/python3.6/site-packages/efb_telegram_master/__init__.py", line 28, in <module>

      from . import utils as etm_utils

      File "/usr/local/lib/python3.6/site-packages/efb_telegram_master/utils.py", line 10, in <module>

      from tgs.parsers.tgs import parse_tgs

      File "/usr/local/lib/python3.6/site-packages/tgs/__init__.py", line 1, in <module>

      from . import objects, parsers, utils, exporters, nvector

      File "/usr/local/lib/python3.6/site-packages/tgs/parsers/__init__.py", line 1, in <module>

      from . import svg, tgs, sif

      File "/usr/local/lib/python3.6/site-packages/tgs/parsers/svg/__init__.py", line 1, in <module>

      from .importer import parse_svg_etree, parse_svg_file

      File "/usr/local/lib/python3.6/site-packages/tgs/parsers/svg/importer.py", line 8, in <module>

      from ...utils.ellipse import Ellipse

      File "/usr/local/lib/python3.6/site-packages/tgs/utils/__init__.py", line 1, in <module>

      from . import animation, ellipse, ik, linediff, restructure, script, stripper

      File "/usr/local/lib/python3.6/site-packages/tgs/utils/linediff.py", line 3, in <module>

      from ..exporters import prettyprint

      File "/usr/local/lib/python3.6/site-packages/tgs/exporters/__init__.py", line 16, in <module>

      from . import cairo, gif

      File "/usr/local/lib/python3.6/site-packages/tgs/exporters/cairo.py", line 1, in <module>

      import cairosvg

      File "/usr/local/lib/python3.6/site-packages/cairosvg/__init__.py", line 42, in <module>

      from . import surface # noqa isort:skip

      File "/usr/local/lib/python3.6/site-packages/cairosvg/surface.py", line 25, in <module>

      import cairocffi as cairo

      File "/usr/local/lib/python3.6/site-packages/cairocffi/__init__.py", line 50, in <module>

      ('libcairo.so', 'libcairo.2.dylib', 'libcairo-2.dll'))

      File "/usr/local/lib/python3.6/site-packages/cairocffi/__init__.py", line 45, in dlopen

      raise OSError(error_message) # pragma: no cover

      OSError: no library called "cairo" was found
      no library called "libcairo-2" was found
      cannot load library 'libcairo.so': libcairo.so: cannot open shared object file: No such file or directory
      cannot load library 'libcairo.2.dylib': libcairo.2.dylib: cannot open shared object file: No such file or directory
      cannot load library 'libcairo-2.dll': libcairo-2.dll: cannot open shared object file: No such file or directory
      我也是这个问题,输入ehforwarderbot就会报错 ,我也把pip3的bin目录加入到系统PATH环境变量了,球球大佬们的帮助

      1. jiz4oh
        @Lison

        使用以下命令安装依赖库
        yum install cairo-devel
        yum install libtiff*

      2. Rat's
        @Lison

        好像加载的时候缺少共享库,你可以换个系统操作看看。

        1. Lison
          @Rat's

          我找到原因了,有些vps没有安装Cairo图形库,搭建之后就能显示二维码了

          1. pq8o3q
            @Lison

            大佬,请问下您是怎么搞好的,可以说一下命令吗,我谷歌搜了下,安装了还是不行,非常感谢

            1. Rat's
              @pq8o3q

              这是上面提供的命令:
              yum install cairo-devel
              yum install libtiff*

              1. pq8o3q
                @Rat's

                还有就是就算使用docker,最后也会出现这种错误,用完那两个命令也是依旧会

              2. pq8o3q
                @Rat's

                博主,我也试了,但还是出现上面的错误,不知到怎么回事。centos7原版系统和dd萌咖大佬的debian9,都会出现错误,很郁闷。。。

          2. Rat's
            @Lison

            解决好了就行

  9. 哥哥

    如果配置了多个微信同时接收。如果其中一个掉线了(手机微信换了设备),需要重新登录。那么如何单独重新启动这一个微信了?

    1. Rat's
      @哥哥

      这个不太清楚,没试过单独启动一个

      1. 哥哥
        @Rat's

        我经常遇到重启失败,采取的措施就删掉~/.ehforwarderbot/profiles/default/blueset.wechat
        但是这样有一个很大的问题,就是绑定好的链接会失效,请问你有更好的方法吗?

        1. Rat's
          @哥哥

          其实么有,我用的时间不长,很多情景还没遇到。

          1. 哥哥
            @Rat's

            好的,谢谢分享,有新功能,你可以继续更新的!很期待

  10. Bruce

    请问博主,在微信端已经屏蔽的群消息怎么设置不转发到tg

    1. Rat's
      @Bruce

      这个就不太清楚了,对使用方面研究不太深。