Code Monkey home page Code Monkey logo

ehforwarderbot's Introduction

EH Forwarder Bot

Python >= 3.6

GitHub Discussions

Telegram

Documentation

Tests status

PyPI release

Downloads per month

Codacy grade

Translate this project

Banner

Codename EH Forwarder Bot (EFB) is an extensible message tunneling chat bot framework which delivers messages to and from multiple platforms and remotely control your accounts.

Read the Documentation. For tips, tricks and community contributed articles, see project wiki.

Getting Started

  1. Install the framework:

    pip3 install ehforwarderbot
  2. Install modules from the module repository.
  3. Enable and set up modules:

    efb-wizard
  4. Launch EFB:

    ehforwarderbot

Feel like contributing?

Everyone is welcomed to raise an issue or submit a pull request, just remember to read through and follow the contribution guideline before you do so.

License

EFB framework is licensed under GNU Affero General Public License 3.0 or later versions:

EH Forwarder Bot: An extensible message tunneling chat bot framework.
Copyright (C) 2016 - 2020 Eana Hufwe, and the EH Forwarder Bot contributors
All rights reserved.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

Translation support

EFB supports translated user interface prompts, by setting the locale environmental variable (LANGUAGE, LC_ALL, LC_MESSAGES or LANG) to one of our supported languages. Our documentation is also available in different languages. You can help to translate this project into your languages on our Crowdin page.

ehforwarderbot's People

Contributors

bao3 avatar bennyyip avatar blueset avatar cxumol avatar dependabot-preview[bot] avatar dependabot[bot] avatar greysteil avatar milkice233 avatar ojhdt avatar pyup-bot avatar royxiang avatar specter119 avatar xufan6 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

ehforwarderbot's Issues

运行 python3 daemon.py restart后偶尔出现Connection aborted,但似乎不影响收消息

我用的美国VPS,Ubuntu 16.04.2 LTS (GNU/Linux 2.6.32-042stab123.3 x86_64),
运行 python3 daemon.py restart后偶尔出现Connection aborted,但似乎不影响收消息

~/ehForwarderBot# python3 daemon.py restart
Restarting EFB daemon (1)
PID: 20659
Name: 2460177052
Output is saved to 'EFB.log', showing output now.
Press ^C (Control+C on Mac, Ctrl+C otherwise) to hide.

2017-06-26 23:55:42,437: ehForwarderBot [CRITICAL]
Initializing slave ('plugins.eh_wechat_slave', 'WeChatChannel')...
2017-06-26 23:55:48,117: ehForwarderBot [CRITICAL]
Slave channel WeChat Slave (eh_wechat_slave) initialized.
2017-06-26 23:55:48,117: ehForwarderBot [CRITICAL]
Initializing master ('plugins.eh_telegram_master', 'TelegramChannel')...
2017-06-26 23:55:49,443: ehForwarderBot [CRITICAL]
Master channel Telegram Master (eh_telegram_master) initialized.
2017-06-26 23:55:49,443: ehForwarderBot [CRITICAL]
All channels initialized.
2017-06-27 00:05:17,813: plugins.eh_telegram_master.TelegramChannel [ERROR]
TimedOut()Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/connectionpool.py", line 402, in _make_request
six.raise_from(e, None)
File "", line 2, in raise_from
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/connectionpool.py", line 398, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.5/http/client.py", line 1197, in getresponse
response.begin()
File "/usr/lib/python3.5/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.5/http/client.py", line 258, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.5/socket.py", line 575, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.5/ssl.py", line 929, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.5/ssl.py", line 791, in read
return self._sslobj.read(len, buffer)
File "/usr/lib/python3.5/ssl.py", line 575, in read
v = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/telegram/utils/request.py", line 174, in _request_wrapper
resp = self._con_pool.request(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/request.py", line 70, in request
**urlopen_kw)
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/request.py", line 148, in request_encode_body
return self.urlopen(method, url, **extra_kw)
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/poolmanager.py", line 244, in urlopen
response = conn.urlopen(method, u.request_uri, **kw)
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/connectionpool.py", line 666, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/util/retry.py", line 347, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/packages/six.py", line 686, in reraise
raise value
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/connectionpool.py", line 617, in urlopen
chunked=chunked)
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/connectionpool.py", line 405, in _make_request
exc_cls=ReadTimeoutError)
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/connectionpool.py", line 321, in _raise_timeout
raise exc_cls(*args)
telegram.vendor.ptb_urllib3.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='api.telegram.org', port=443): Read timed out. (read timeout=5.0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/root/ehForwarderBot/plugins/eh_telegram_master/init.py", line 427, in process_msg
tg_msg = self.bot.bot.sendVideo(tg_dest, msg.file, caption=msg_template + msg.text)
File "/usr/local/lib/python3.5/dist-packages/telegram/bot.py", line 52, in decorator
result = func(self, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/telegram/bot.py", line 64, in decorator
return self._message_wrapper(url, data, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/telegram/bot.py", line 156, in _message_wrapper
result = self._request.post(url, data, timeout=kwargs.get('timeout'))
File "/usr/local/lib/python3.5/dist-packages/telegram/utils/request.py", line 244, in post
'POST', url, body=data.to_form(), headers=data.headers, **urlopen_kwargs)
File "/usr/local/lib/python3.5/dist-packages/telegram/utils/request.py", line 176, in _request_wrapper
raise TimedOut()
telegram.error.TimedOut: Timed out

2017-06-27 00:08:01,013: plugins.eh_telegram_master.TelegramChannel [ERROR]
NetworkError()Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/connectionpool.py", line 617, in urlopen
chunked=chunked)
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/connectionpool.py", line 390, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.5/http/client.py", line 1106, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.5/http/client.py", line 1151, in _send_request
self.endheaders(body)
File "/usr/lib/python3.5/http/client.py", line 1102, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.5/http/client.py", line 936, in _send_output
self.send(message_body)
File "/usr/lib/python3.5/http/client.py", line 908, in send
self.sock.sendall(data)
File "/usr/lib/python3.5/ssl.py", line 891, in sendall
v = self.send(data[count:])
File "/usr/lib/python3.5/ssl.py", line 861, in send
return self._sslobj.write(data)
File "/usr/lib/python3.5/ssl.py", line 586, in write
return self._sslobj.write(data)
socket.timeout: The write operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/telegram/utils/request.py", line 174, in _request_wrapper
resp = self._con_pool.request(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/request.py", line 70, in request
**urlopen_kw)
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/request.py", line 148, in request_encode_body
return self.urlopen(method, url, **extra_kw)
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/poolmanager.py", line 244, in urlopen
response = conn.urlopen(method, u.request_uri, **kw)
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/connectionpool.py", line 666, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/util/retry.py", line 347, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/packages/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/connectionpool.py", line 617, in urlopen
chunked=chunked)
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/connectionpool.py", line 390, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.5/http/client.py", line 1106, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.5/http/client.py", line 1151, in _send_request
self.endheaders(body)
File "/usr/lib/python3.5/http/client.py", line 1102, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.5/http/client.py", line 936, in _send_output
self.send(message_body)
File "/usr/lib/python3.5/http/client.py", line 908, in send
self.sock.sendall(data)
File "/usr/lib/python3.5/ssl.py", line 891, in sendall
v = self.send(data[count:])
File "/usr/lib/python3.5/ssl.py", line 861, in send
return self._sslobj.write(data)
File "/usr/lib/python3.5/ssl.py", line 586, in write
return self._sslobj.write(data)
telegram.vendor.ptb_urllib3.urllib3.exceptions.ProtocolError: ('Connection aborted.', timeout('The write operation timed out',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/root/ehForwarderBot/plugins/eh_telegram_master/init.py", line 427, in process_msg
tg_msg = self.bot.bot.sendVideo(tg_dest, msg.file, caption=msg_template + msg.text)
File "/usr/local/lib/python3.5/dist-packages/telegram/bot.py", line 52, in decorator
result = func(self, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/telegram/bot.py", line 64, in decorator
return self._message_wrapper(url, data, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/telegram/bot.py", line 156, in _message_wrapper
result = self._request.post(url, data, timeout=kwargs.get('timeout'))
File "/usr/local/lib/python3.5/dist-packages/telegram/utils/request.py", line 244, in post
'POST', url, body=data.to_form(), headers=data.headers, **urlopen_kwargs)
File "/usr/local/lib/python3.5/dist-packages/telegram/utils/request.py", line 180, in _request_wrapper
raise NetworkError('urllib3 HTTPError {0}'.format(error))
telegram.error.NetworkError: urllib3 HTTPError ('Connection aborted.', timeout('The write operation timed out',))

2017-06-27 00:13:55,005: plugins.eh_telegram_master.TelegramChannel [ERROR]
TimedOut()Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/connectionpool.py", line 402, in _make_request
six.raise_from(e, None)
File "", line 2, in raise_from
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/connectionpool.py", line 398, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.5/http/client.py", line 1197, in getresponse
response.begin()
File "/usr/lib/python3.5/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.5/http/client.py", line 258, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.5/socket.py", line 575, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.5/ssl.py", line 929, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.5/ssl.py", line 791, in read
return self._sslobj.read(len, buffer)
File "/usr/lib/python3.5/ssl.py", line 575, in read
v = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/telegram/utils/request.py", line 174, in _request_wrapper
resp = self._con_pool.request(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/request.py", line 70, in request
**urlopen_kw)
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/request.py", line 148, in request_encode_body
return self.urlopen(method, url, **extra_kw)
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/poolmanager.py", line 244, in urlopen
response = conn.urlopen(method, u.request_uri, **kw)
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/connectionpool.py", line 666, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/util/retry.py", line 347, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/packages/six.py", line 686, in reraise
raise value
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/connectionpool.py", line 617, in urlopen
chunked=chunked)
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/connectionpool.py", line 405, in _make_request
exc_cls=ReadTimeoutError)
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/connectionpool.py", line 321, in _raise_timeout
raise exc_cls(*args)
telegram.vendor.ptb_urllib3.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='api.telegram.org', port=443): Read timed out. (read timeout=5.0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/root/ehForwarderBot/plugins/eh_telegram_master/init.py", line 427, in process_msg
tg_msg = self.bot.bot.sendVideo(tg_dest, msg.file, caption=msg_template + msg.text)
File "/usr/local/lib/python3.5/dist-packages/telegram/bot.py", line 52, in decorator
result = func(self, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/telegram/bot.py", line 64, in decorator
return self._message_wrapper(url, data, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/telegram/bot.py", line 156, in _message_wrapper
result = self._request.post(url, data, timeout=kwargs.get('timeout'))
File "/usr/local/lib/python3.5/dist-packages/telegram/utils/request.py", line 244, in post
'POST', url, body=data.to_form(), headers=data.headers, **urlopen_kwargs)
File "/usr/local/lib/python3.5/dist-packages/telegram/utils/request.py", line 176, in _request_wrapper
raise TimedOut()
telegram.error.TimedOut: Timed out

2017-06-27 00:16:17,801: plugins.eh_telegram_master.TelegramChannel [ERROR]
NetworkError()Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/connectionpool.py", line 617, in urlopen
chunked=chunked)
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/connectionpool.py", line 390, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.5/http/client.py", line 1106, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.5/http/client.py", line 1151, in _send_request
self.endheaders(body)
File "/usr/lib/python3.5/http/client.py", line 1102, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.5/http/client.py", line 936, in _send_output
self.send(message_body)
File "/usr/lib/python3.5/http/client.py", line 908, in send
self.sock.sendall(data)
File "/usr/lib/python3.5/ssl.py", line 891, in sendall
v = self.send(data[count:])
File "/usr/lib/python3.5/ssl.py", line 861, in send
return self._sslobj.write(data)
File "/usr/lib/python3.5/ssl.py", line 586, in write
return self._sslobj.write(data)
socket.timeout: The write operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/telegram/utils/request.py", line 174, in _request_wrapper
resp = self._con_pool.request(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/request.py", line 70, in request
**urlopen_kw)
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/request.py", line 148, in request_encode_body
return self.urlopen(method, url, **extra_kw)
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/poolmanager.py", line 244, in urlopen
response = conn.urlopen(method, u.request_uri, **kw)
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/connectionpool.py", line 666, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/util/retry.py", line 347, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/packages/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/connectionpool.py", line 617, in urlopen
chunked=chunked)
File "/usr/local/lib/python3.5/dist-packages/telegram/vendor/ptb_urllib3/urllib3/connectionpool.py", line 390, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.5/http/client.py", line 1106, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.5/http/client.py", line 1151, in _send_request
self.endheaders(body)
File "/usr/lib/python3.5/http/client.py", line 1102, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.5/http/client.py", line 936, in _send_output
self.send(message_body)
File "/usr/lib/python3.5/http/client.py", line 908, in send
self.sock.sendall(data)
File "/usr/lib/python3.5/ssl.py", line 891, in sendall
v = self.send(data[count:])
File "/usr/lib/python3.5/ssl.py", line 861, in send
return self._sslobj.write(data)
File "/usr/lib/python3.5/ssl.py", line 586, in write
return self._sslobj.write(data)
telegram.vendor.ptb_urllib3.urllib3.exceptions.ProtocolError: ('Connection aborted.', timeout('The write operation timed out',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/root/ehForwarderBot/plugins/eh_telegram_master/init.py", line 427, in process_msg
tg_msg = self.bot.bot.sendVideo(tg_dest, msg.file, caption=msg_template + msg.text)
File "/usr/local/lib/python3.5/dist-packages/telegram/bot.py", line 52, in decorator
result = func(self, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/telegram/bot.py", line 64, in decorator
return self._message_wrapper(url, data, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/telegram/bot.py", line 156, in _message_wrapper
result = self._request.post(url, data, timeout=kwargs.get('timeout'))
File "/usr/local/lib/python3.5/dist-packages/telegram/utils/request.py", line 244, in post
'POST', url, body=data.to_form(), headers=data.headers, **urlopen_kwargs)
File "/usr/local/lib/python3.5/dist-packages/telegram/utils/request.py", line 180, in _request_wrapper
raise NetworkError('urllib3 HTTPError {0}'.format(error))
telegram.error.NetworkError: urllib3 HTTPError ('Connection aborted.', timeout('The write operation timed out',))

Some link message dont have description attributes

2017-01-15 21:28:37,991: plugins.eh_wechat_slave.WeChatChannel [INFO]
    ---
New Link msg, {'MediaId': '', 'CreateTime': 1484515715, 'Ticket': '', 'Content': '<msg> <appmsg appid="" sdkver="0"> \t<title><![CDATA[账户查询]]></title> \t<des><![CDATA[ ]]></des> \t<action></action> \t<type>5</type> \t<showtype>1</showtype>     <soundtype>0</soundtype> \t<content><![CDATA[]]></content> \t<contentattr>0</contentattr> \t<url><![CDATA[https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxe9dxxx&redirect_uri=https://weixin.spdbccc.com.cn/spdbcccWeChatPage/linkRedirection.do?activityKey%3Dd&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect]]></url> \t<lowurl><![CDATA[]]></lowurl> \t<appattach> \t\t<totallen>0</totallen> \t\t<attachid></attachid> \t\t<fileext></fileext> \t</appattach> \t<extinfo></extinfo> \t<mmreader> \t\t<category type="0" count="1"> \t\t\t<name><![CDATA[浦发银行信用卡]]></name> \t\t\t<topnew> \t\t\t\t<cover><![CDATA[http://weixin.spdbccc.com.cn/spdbcccfile/file/image/ImageText/zhanghuchaxun_201610271715.jpg]]></cover> \t\t\t\t<width>336</width> \t\t\t\t<height>215</height> \t\t\t\t<digest><![CDATA[ ]]></digest> \t\t\t</topnew> \t\t\t\t<item> \t<itemshowtype>0</itemshowtype> \t<title><![CDATA[账户查询]]></title> \t<url><![CDATA[https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxe9dxxx&redirect_uri=https://weixin.spdbccc.com.cn/spdbcccWeChatPage/linkRedirection.do?activityKey%3Dd&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect]]></url> \t<shorturl><![CDATA[]]></shorturl> \t<longurl><![CDATA[]]></longurl> \t<pub_time>1484515715</pub_time> \t<cover><![CDATA[http://weixin.spdbccc.com.cn/spdbcccfile/file/image/ImageText/zhanghuchaxun_201610271715.jpg]]></cover> \t<tweetid></tweetid> \t<digest><![CDATA[ ]]></digest> \t<fileid>0</fileid> \t<sources> \t<source> \t<name><![CDATA[浦发银行信用卡]]></name> \t</source> \t</sources> \t<styles></styles>\t<native_url></native_url>    <del_flag>0</del_flag>     <contentattr>0</contentattr>     <play_length>0</play_length> \t<play_url></play_url> \t<player><![CDATA[]]></player> \t</item> \t\t</category> \t\t<publisher> \t\t\t<username><![CDATA[gh_4e]]></username> \t\t\t<nickname><![CDATA[浦发银行信用卡]]></nickname> \t\t</publisher> \t\t<template_header></template_header> \t\t<template_detail></template_detail> \t    <forbid_forward>0</forbid_forward> \t</mmreader> \t<thumburl><![CDATA[http://weixin.spdbccc.com.cn/spdbcccfile/file/image/ImageText/zhanghuchaxun_201610271715.jpg]]></thumburl> \t                          </appmsg><fromusername><![CDATA[gh_4e]]></fromusername><appinfo><version>0</version><appname><![CDATA[浦发银行信用卡]]></appname><isforceupdate>1</isforceupdate></appinfo></msg>', 'FromUserName': '@42abcde', 'Url': 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxe9d&amp;redirect_uri=https://weixin.spdbccc.com.cn/spdbcccWeChatPage/linkRedirection.do?activityKey%3Dczd&amp;response_type=code&amp;scope=snsapi_base&amp;state=STATE#wechat_redirect', 'OriContent': '', 'FileName': '账户查询', 'MsgType': 49, 'ImgWidth': 0, 'Type': 'Sharing', 'Status': 3, 'ImgStatus': 1, 'Text': '账户查询', 'StatusNotifyUserName': '', 'MsgId': '269', 'PlayLength': 0, 'AppInfo': {'AppID': '', 'Type': 0}, 'NewMsgId': 269, 'VoiceLength': 0, 'ToUserName': '@c2b', 'FileSize': '0', 'ImgHeight': 0, 'AppMsgType': 5, 'StatusNotifyCode': 0, 'RecommendInfo': {'NickName': '', 'QQNum': 0, 'Content': '', 'OpCode': 0, 'Ticket': '', 'Sex': 0, 'Scene': 0, 'Signature': '', 'AttrStatus': 0, 'Province': '', 'Alias': '', 'City': '', 'VerifyFlag': 0, 'UserName': ''}, 'HasProductId': 0, 'ForwardFlag': 0, 'SubMsgType': 0}
2017-01-15 21:28:37,991: plugins.eh_telegram_master.TelegramChannel [INFO]
    Got message from queue

2017-01-15 21:28:40,604: plugins.eh_telegram_master.TelegramChannel [DEBUG]
    1484515720.602592, process_msg_step_2
2017-01-15 21:28:40,605: plugins.eh_telegram_master.TelegramChannel [ERROR]
    AttributeError("'NoneType' object has no attribute 'replace'",)Traceback (most recent call last):
  File "/home/xf/repo/ehForwarderBot/plugins/eh_telegram_master/__init__.py", line 287, in process_msg
    html.escape(msg.attributes["description"]))
  File "/home/xf/.pyenv/versions/3.5.2/lib/python3.5/html/__init__.py", line 19, in escape
    s = s.replace("&", "&amp;") # Must be done first!
AttributeError: 'NoneType' object has no attribute 'replace'


Poor internet connection 是 VPS 质量的问题吗?

最近 Bot 经常收到这样的消息:

Wechat:
EFB Telegram Master channel
You may have a poor internet connection on your server. Currently 43 time-out errors are detected.
For more details, please refer to the log.

查看 log:

Update: None
Update: None
2017-06-29 03:23:04,165: telegram.ext.updater [ERROR]
    Error while getting Updates: Timed out
2017-06-29 03:23:04,166: plugins.eh_telegram_master.TelegramChannel [ERROR]
    Poor internet connection detected.
Error count: 43
\Timed out

这是 VPS 的质量不好的原因吗?

你好,请问微信图文消息的某些字段里面的参数是什么意思

<cdnth啊umburl>304c0201000445304302010002041301e9b802033d14b9020460e503b7020458fcbd860421777869645f39776631666d376c6f64306e32323231395f313439323935383539350201000201000400</cdnthu啊mburl>

<cdnthumble啊ngth>9467</cdnth啊umblength>

<cdnthumb啊aeskey>35336666623736383565323062303538</cdnthum啊baeskey>

<ae啊skey>35336666623736383565323062303538</aes啊key>

请去掉啊。。。

No module named 'pyqrcode'

I installed python-pyqrcode-5.3-3 on Arch Linux but it encountered the problem below:

pid: 17896
   Output is saved to 'EFB.log', showing output now.       
   Press ^C (Control+C on Mac, Ctrl+C otherwise) to hide.  

2017-03-03 11:05:03,566: ehForwarderBot [CRITICAL]
     Initializing slave ('plugins.eh_wechat_slave', 'WeChatChannel')... 
Traceback (most recent call last):
  File "main.py", line 131, in <module>
    init()
  File "main.py", line 83, in init
    obj = getattr(__import__(i[0], fromlist=i[1]), i[1])
  File "/home/alex/ehForwarderBot/plugins/eh_wechat_slave.py", line 15, in <module>
    from pyqrcode import QRCode
ModuleNotFoundError: No module named 'pyqrcode'

This is definately a serious bug.

关于从tg传文件到微信

文件名是 hh工作簿1.xlsx
出现在微信聊天记录里是 hh工作簿1.xlsx.h

2017-06-02 19:33:49,062: telegram.ext.dispatcher [DEBUG]
    Processing Update: {'update_id': 336460739, 'message': {'chat': {'type': 'group', 'id': -201032932, 'first_name': '', 'last_name': '', 'username': '', 'all_members_are_admins': False, 'title': '偏锋测试'}, 'new_chat_title': '', 'supergroup_chat_created': False, 'message_id': 4672, 'migrate_from_chat_id': 0, 'date': 1496403228, 'text': '', 'delete_chat_photo': False, 'new_chat_photo': [], 'caption': '66666666666', 'document': {'mime_type': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'file_size': 10380, 'file_name': 'hh工作簿1.xlsx', 'file_id': 'BQADBQADBgADiOSQVVJ5sB0hVNf4Ag'}, 'group_chat_created': False, 'from': {'id': 332872098, 'last_name': '', 'username': 'trysh86', 'first_name': 'trysh', 'type': ''}, 'migrate_to_chat_id': 0, 'photo': [], 'channel_chat_created': False, 'entities': []}}
2017-06-02 19:33:49,063: plugins.eh_telegram_master.TelegramChannel [DEBUG]
    ----
Msg from tg user:
{'chat': {'type': 'group', 'id': -201032932, 'first_name': '', 'last_name': '', 'username': '', 'all_members_are_admins': False, 'title': '偏锋测试'}, 'new_chat_title': '', 'supergroup_chat_created': False, 'message_id': 4672, 'migrate_from_chat_id': 0, 'date': 1496403228, 'text': '', 'delete_chat_photo': False, 'new_chat_photo': [], 'caption': '66666666666', 'document': {'mime_type': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'file_size': 10380, 'file_name': 'hh工作簿1.xlsx', 'file_id': 'BQADBQADBgADiOSQVVJ5sB0hVNf4Ag'}, 'group_chat_created': False, 'from': {'id': 332872098, 'last_name': '', 'username': 'trysh86', 'first_name': 'trysh', 'type': ''}, 'migrate_to_chat_id': 0, 'photo': [], 'channel_chat_created': False, 'entities': []}
2017-06-02 19:33:49,064: peewee [DEBUG]
    ('SELECT "t1"."id", "t1"."master_uid", "t1"."slave_uid" FROM "chatassoc" AS t1 WHERE ("t1"."master_uid" = ?)', ['eh_telegram_master.-201032932'])
2017-06-02 19:33:49,064: plugins.eh_telegram_master.TelegramChannel [DEBUG]
    ----
Msg from tg user:
{'chat': {'type': 'group', 'id': -201032932, 'first_name': '', 'last_name': '', 'username': '', 'all_members_are_admins': False, 'title': '偏锋测试'}, 'new_chat_title': '', 'supergroup_chat_created': False, 'message_id': 4672, 'migrate_from_chat_id': 0, 'date': 1496403228, 'text': '', 'delete_chat_photo': False, 'new_chat_photo': [], 'caption': '66666666666', 'document': {'mime_type': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'file_size': 10380, 'file_name': 'hh工作簿1.xlsx', 'file_id': 'BQADBQADBgADiOSQVVJ5sB0hVNf4Ag'}, 'group_chat_created': False, 'from': {'id': 332872098, 'last_name': '', 'username': 'trysh86', 'first_name': 'trysh', 'type': ''}, 'migrate_to_chat_id': 0, 'photo': [], 'channel_chat_created': False, 'entities': []}
2017-06-02 19:33:49,065: peewee [DEBUG]
    ('SELECT "t1"."id", "t1"."master_uid", "t1"."slave_uid" FROM "chatassoc" AS t1 WHERE ("t1"."master_uid" = ?)', ['eh_telegram_master.-201032932'])
2017-06-02 19:33:49,065: plugins.eh_telegram_master.TelegramChannel [DEBUG]
    Destination chat = eh_wechat_slave.2443522499
2017-06-02 19:33:49,066: plugins.eh_telegram_master.TelegramChannel [DEBUG]
    Msg type: Document
2017-06-02 19:33:49,066: plugins.eh_telegram_master.TelegramChannel [DEBUG]
    tg: Document file received
2017-06-02 19:33:50,622: plugins.eh_telegram_master.TelegramChannel [WARNING]
    File storage/eh_telegram_master/File_-201032932_4672_1496403230 with mime application/vnd.openxmlformats-officedocument.spreadsheetml.sheet has no matching extensions.
2017-06-02 19:33:56,081: plugins.eh_wechat_slave.WeChatChannel [INFO]
    Sending message to WeChat:
Target-------
uid: 2443522499
UserName: @@456ee3a71ab6b7e6944280d95bbf5d039ddba11526c32eaa7298edd37d67cc69
NickName: 
Type: File
Text: 66666666666
2017-06-02 19:33:56,082: plugins.eh_wechat_slave.WeChatChannel [INFO]
    Sending File to WeChat
FileName: 66666666666
Path: storage/eh_telegram_master/File_-201032932_4672_1496403230.unknown
Filename: hh工作簿1.xlsx
2017-06-02 19:33:56,082: itchat [DEBUG]
    Request to upload a file: storage/eh_telegram_master/File_-201032932_4672_1496403230.unknown
2017-06-02 19:33:56,418: itchat [DEBUG]
    Request to send a text message to @@456ee3a71ab6b7e6944280d95bbf5d039ddba11526c32eaa7298edd37d67cc69: 66666666666
2017-06-02 19:33:56,715: peewee [DEBUG]
    ('INSERT INTO "msglog" ("master_msg_id", "slave_message_id", "text", "slave_origin_uid", "slave_origin_display_name", "slave_member_uid", "slave_member_display_name", "msg_type", "sent_to", "time") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', ['-201032932.4672', '2865668647267531631', '66666666666', 'eh_wechat_slave.2443522499', '__chat__', None, None, 'File', 'slave', datetime.datetime(2017, 6, 2, 19, 33, 56, 714519)])

Sometimes cannot send but able to receive, better handle send timeout with telegram bot api

2017-01-23 12:47:41,090: telegram.ext.updater [ERROR]
    Error while getting Updates: Timed out
2017-01-23 12:47:41,091: telegram.ext.updater [ERROR]
    unhandled exception

...

File "/usr/local/lib/python3.5/site-packages/telegram/bot.py", line 151, in decorator
    result = self._request.post(url, data, timeout=kwargs.get('timeout'))
  File "/usr/local/lib/python3.5/site-packages/telegram/utils/request.py", line 207, in post
    **urlopen_kwargs)
  File "/usr/local/lib/python3.5/site-packages/telegram/utils/request.py", line 138, in _request_wrapper
    raise NetworkError('urllib3 HTTPError {0}'.format(error))
telegram.error.NetworkError: urllib3 HTTPError EOF occurred in violation of protocol (_ssl.c:646)

2017-01-23 12:47:42,088: telegram.ext.updater [ERROR]
    Error while getting Updates: urllib3 HTTPError EOF occurred in violation of protocol (_ssl.c:646)
2017-01-23 12:47:53,593: telegram.ext.updater [ERROR]
    Error while getting Updates: urllib3 HTTPError EOF occurred in violation of protocol (_ssl.c:646)
2017-01-23 12:48:05,850: telegram.ext.updater [ERROR]
    Error while getting Updates: urllib3 HTTPError EOF occurred in violation of protocol (_ssl.c:646)

thanks

Most time could not receive message

And when receivemessage is wechat emoji it show "Error: Empty Image received. (MS01)"
This message was one of two message i received another waas from group chat.
These two message receive when the bot was force stop.

无法发送消息?

/chat 无法发送消息
Message is not sent. (MN01)

{'LocalID': '', 'MsgID': '', 'BaseResponse': {'RawMsg': '', 'ErrMsg': '', 'Ret': 1102}}

daemon启动报错

你好,我按照文档配置了config.py文件,但是执行daemon.py文件时出现以下错误信息。我是完全从文档中复制来的。

Traceback (most recent call last):
File "main.py", line 131, in
init()
File "main.py", line 83, in init
obj = getattr(import(i[0], fromlist=i[1]), i[1])
ModuleNotFoundError: No module named 'plugins.eh_demo_slave'

我的config.py相关字段为
master_channel = "plugins.eh_demo_master", "DemoMasterChannel"
slave_channels = [
("plugins.eh_demo_slave", "DemoSlaveChannel"),
("plugins.eh_random_slave", "RandomSlaveChannel"),
("plugins.eh_mychat_slave", "MyChatSlaveChannel")
]

EWS mp multi link style message only send the first link

"extra_links_on_message": True

2017-02-11 10:34:57,554: plugins.eh_wechat_slave.incomeMsgMeta [DEBUG]
    Raw message: {'HasProductId': 0, 'VoiceLength': 0, 'StatusNotifyUserName': '', 'AppMsgType': 5, 'Url': 'http://mp.weixin.qq.com/s?__biz=MjM5MjM3NzQwMA==&amp;mid=2650980804&amp;idx=1&amp;sn=17d3cc681ef18387aff3a39b5af9ec95&amp;chksm=bd515e938a26d785f24bb03fb2df3e25e25afe24d75a6a7ae38caeb97a5097b696dc9b2d2b33&amp;scene=0#rd', 'PlayLength': 0, 'Ticket': '', 'Content': '<msg>\n    <appmsg appid="" sdkver="0">\n        <title><![CDATA[任天堂居然出了一款氪金手游,不仅很良心还挺好玩]]></title>\n        <des><![CDATA[那个曾经骄傲的任天堂,终于低下头颅,踏踏实实地赚钱了。]]></des>\n        <action></action>\n        <type>5</type>\n        <showtype>1</showtype>\n        <content><![CDATA[]]></content>\n        <contentattr>1</contentattr>\n        <url><![CDATA[http://mp.weixin.qq.com/s?__biz=MjM5MjM3NzQwMA==&mid=2650980804&idx=1&sn=17d3cc681ef18387aff3a39b5af9ec95&chksm=bd515e938a26d785f24bb03fb2df3e25e25afe24d75a6a7ae38caeb97a5097b696dc9b2d2b33&scene=0#rd]]></url>\n        <lowurl><![CDATA[]]></lowurl>\n        <appattach>\n            <totallen>0</totallen>\n            <attachid></attachid>\n            <fileext></fileext>\n        </appattach>\n        <extinfo></extinfo>\n        <mmreader>\n            <category type="20" count="4">\n                <name><![CDATA[PingWest品玩]]></name>\n                <topnew>\n                    <cover><![CDATA[http://mmbiz.qpic.cn/mmbiz_jpg/EfY115GicZB5kNjs6RHxsOfx7YjR7D1sUZyexqDpeRyfHMDMhXhqYp6ZW9rM49YKPOrdmy5da7C6tQicQMVH1Olg/640?wxtype=jpeg&wxfrom=0]]></cover>\n                    <width>0</width>\n                    <height>0</height>\n                    <digest><![CDATA[]]></digest>\n                </topnew>\n                \n                <item>\n                    <itemshowtype>0</itemshowtype>\n                    <title><![CDATA[任天堂居然出了一款氪金手游,不仅很良心还挺好玩]]></title>\n                    <url><![CDATA[http://mp.weixin.qq.com/s?__biz=MjM5MjM3NzQwMA==&mid=2650980804&idx=1&sn=17d3cc681ef18387aff3a39b5af9ec95&chksm=bd515e938a26d785f24bb03fb2df3e25e25afe24d75a6a7ae38caeb97a5097b696dc9b2d2b33&scene=0#rd]]></url>\n                    <shorturl><![CDATA[]]></shorturl>\n                    <longurl><![CDATA[]]></longurl>\n                    <pub_time>1486780488</pub_time>\n                    <cover><![CDATA[http://mmbiz.qpic.cn/mmbiz_jpg/EfY115GicZB5kNjs6RHxsOfx7YjR7D1sUZyexqDpeRyfHMDMhXhqYp6ZW9rM49YKPOrdmy5da7C6tQicQMVH1Olg/640?wxtype=jpeg&wxfrom=0]]></cover>\n                    <tweetid></tweetid>\n                    <digest><![CDATA[那个曾经骄傲的任天堂,终于低下头颅,踏踏实实地赚钱了。]]></digest>\n                    <fileid>503497142</fileid>\n                    <sources>\n                        <source>\n                            <name><![CDATA[PingWest品玩]]></name>\n                        </source>\n                    </sources>\n                    <styles></styles>\n                    <native_url></native_url>\n                    <del_flag>0</del_flag>\n                    <contentattr>1</contentattr>\n                    <play_length>0</play_length>\n                </item>\n                \n                <item>\n                    <itemshowtype>0</itemshowtype>\n                    <title><![CDATA[别的公司还在砸钱投资人工智能时,英伟达已经因为这项技术赚翻了]]></title>\n                    <url><![CDATA[http://mp.weixin.qq.com/s?__biz=MjM5MjM3NzQwMA==&mid=2650980804&idx=2&sn=c656adb3a9210048d6c7036212f587a6&chksm=bd515e938a26d7854ee7e80e3015553ac80df755064d10fa9ac4287c631ebf7dee309ca9031f&scene=0#rd]]></url>\n                    <shorturl><![CDATA[]]></shorturl>\n                    <longurl><![CDATA[]]></longurl>\n                    <pub_time>1486780488</pub_time>\n                    <cover><![CDATA[http://mmbiz.qpic.cn/mmbiz_jpg/EfY115GicZB5kNjs6RHxsOfx7YjR7D1sU6mvr787YOrZhaxm4a6gBzLfpypjI0MpoZV9XkwNWl2icUZsibJajIDyw/300?wxtype=jpeg&wxfrom=0]]></cover>\n                    <tweetid></tweetid>\n                    <digest><![CDATA[黄仁勋的话可以翻译成:我们的股票你可拿好了,过几年包你赚翻……]]></digest>\n                    <fileid>503497149</fileid>\n                    <sources>\n                        <source>\n                            <name><![CDATA[PingWest品玩]]></name>\n                        </source>\n                    </sources>\n                    <styles></styles>\n                    <native_url></native_url>\n                    <del_flag>0</del_flag>\n                    <contentattr>1</contentattr>\n                    <play_length>0</play_length>\n                </item>\n                \n                <item>\n                    <itemshowtype>0</itemshowtype>\n                    <title><![CDATA[什么?Google居然还惦记着做手表?]]></title>\n                    <url><![CDATA[http://mp.weixin.qq.com/s?__biz=MjM5MjM3NzQwMA==&mid=2650980804&idx=3&sn=db10bee7a5f2ab6d6a49e22a87b23859&chksm=bd515e938a26d7855ee1ecca1eb8c097675207c9af2b749916c8d051963ee70b8490e888492b&scene=0#rd]]></url>\n                    <shorturl><![CDATA[]]></shorturl>\n                    <longurl><![CDATA[]]></longurl>\n                    <pub_time>1486780488</pub_time>\n                    <cover><![CDATA[http://mmbiz.qpic.cn/mmbiz_jpg/EfY115GicZB5kNjs6RHxsOfx7YjR7D1sUNloCpJDwAJR03VxunibA3DIuEC1zf6jutfBKibibiaV5ZOgEyMgaQVJ4mg/300?wxtype=jpg/EfY115&wxfrom=0]]></cover>\n                    <tweetid></tweetid>\n                    <digest><![CDATA[你买或不买,Android Wear 的新手表都在那里。]]></digest>\n                    <fileid>0</fileid>\n                    <sources>\n                        <source>\n                            <name><![CDATA[PingWest品玩]]></name>\n                        </source>\n                    </sources>\n                    <styles></styles>\n                    <native_url></native_url>\n                    <del_flag>0</del_flag>\n                    <contentattr>1</contentattr>\n                    <play_length>0</play_length>\n                </item>\n                \n                <item>\n                    <itemshowtype>0</itemshowtype>\n                    <title><![CDATA[NoPing 一周精选:您的粉丝受教育程度高,理性消费,所以不值什么钱]]></title>\n                    <url><![CDATA[http://mp.weixin.qq.com/s?__biz=MjM5MjM3NzQwMA==&mid=2650980804&idx=4&sn=fe2c7a5e5cbf6b71fa0bf18b21f10876&chksm=bd515e938a26d785efaf2073fb90a26c78d9bebc829157aeb76d0cd600112104e354f247a2bd&scene=0#rd]]></url>\n                    <shorturl><![CDATA[]]></shorturl>\n                    <longurl><![CDATA[]]></longurl>\n                    <pub_time>1486780488</pub_time>\n                    <cover><![CDATA[http://mmbiz.qpic.cn/mmbiz_jpg/EfY115GicZB5kNjs6RHxsOfx7YjR7D1sUnMMIFqJlX4zHfnXLPibNicjIKdU8oBnvrbSp2sQnas4f3WzZWLT9pqng/300?wxtype=jpeg&wxfrom=0]]></cover>\n                    <tweetid></tweetid>\n                    <digest><![CDATA[泥嚎!这里是品玩的新节目——NoPingWest 精选]]></digest>\n                    <fileid>503497155</fileid>\n                    <sources>\n                        <source>\n                            <name><![CDATA[PingWest品玩]]></name>\n                        </source>\n                    </sources>\n                    <styles></styles>\n                    <native_url></native_url>\n                    <del_flag>0</del_flag>\n                    <contentattr>1</contentattr>\n                    <play_length>0</play_length>\n                </item>\n                \n            </category>\n            <publisher>\n                <username><![CDATA[gh_63e439b69de5]]></username>\n                <nickname><![CDATA[PingWest品玩]]></nickname>\n            </publisher>\n            <template_header></template_header>\n            <template_detail></template_detail>\n            <forbid_forward>0</forbid_forward>\n        </mmreader>\n        <thumburl><![CDATA[http://mmbiz.qpic.cn/mmbiz_jpg/EfY115GicZB5kNjs6RHxsOfx7YjR7D1sUZyexqDpeRyfHMDMhXhqYp6ZW9rM49YKPOrdmy5da7C6tQicQMVH1Olg/640?wxtype=jpeg&wxfrom=0]]></thumburl>\n    </appmsg>\n    <fromusername><![CDATA[gh_63e439b69de5]]></fromusername>\n    <appinfo>\n        <version></version>\n        <appname><![CDATA[PingWest品玩]]></appname>\n        <isforceupdate>1</isforceupdate>\n    </appinfo>\n    \n    \n    \n    \n    \n    \n</msg>', 'StatusNotifyCode': 0, 'FromUserName': '@44a6b70e2c300aad7295643247a6c818', 'ForwardFlag': 0, 'ImgHeight': 0, 'NewMsgId': 7668771430353908548, 'Text': '任天堂居然出了一款氪金手游,不仅很良心还挺好玩', 'CreateTime': 1486780495, 'MsgId': '7668771430353908548', 'Status': 3, 'RecommendInfo': {'QQNum': 0, 'OpCode': 0, 'VerifyFlag': 0, 'City': '', 'Scene': 0, 'Ticket': '', 'Content': '', 'Alias': '', 'Province': '', 'Sex': 0, 'UserName': '', 'NickName': '', 'AttrStatus': 0, 'Signature': ''}, 'MediaId': '', 'AppInfo': {'AppID': '', 'Type': 0}, 'FileSize': '0', 'Type': 'Sharing', 'ImgStatus': 1, 'OriContent': '', 'FileName': '任天堂居然出了一款氪金手游,不仅很良心还挺好玩', 'ToUserName': '@099639dbd19fabc188880a2c66c32d7c', 'ImgWidth': 0, 'SubMsgType': 0, 'MsgType': 49}
2017-02-11 10:34:57,554: plugins.eh_wechat_slave.WeChatChannel [INFO]
    ---
New Link msg, {'HasProductId': 0, 'VoiceLength': 0, 'StatusNotifyUserName': '', 'AppMsgType': 5, 'Url': 'http://mp.weixin.qq.com/s?__biz=MjM5MjM3NzQwMA==&amp;mid=2650980804&amp;idx=1&amp;sn=17d3cc681ef18387aff3a39b5af9ec95&amp;chksm=bd515e938a26d785f24bb03fb2df3e25e25afe24d75a6a7ae38caeb97a5097b696dc9b2d2b33&amp;scene=0#rd', 'PlayLength': 0, 'Ticket': '', 'Content': '<msg>\n    <appmsg appid="" sdkver="0">\n        <title><![CDATA[任天堂居然出了一款氪金手游,不仅很良心还挺好玩]]></title>\n        <des><![CDATA[那个曾经骄傲的任天堂,终于低下头颅,踏踏实实地赚钱了。]]></des>\n        <action></action>\n        <type>5</type>\n        <showtype>1</showtype>\n        <content><![CDATA[]]></content>\n        <contentattr>1</contentattr>\n        <url><![CDATA[http://mp.weixin.qq.com/s?__biz=MjM5MjM3NzQwMA==&mid=2650980804&idx=1&sn=17d3cc681ef18387aff3a39b5af9ec95&chksm=bd515e938a26d785f24bb03fb2df3e25e25afe24d75a6a7ae38caeb97a5097b696dc9b2d2b33&scene=0#rd]]></url>\n        <lowurl><![CDATA[]]></lowurl>\n        <appattach>\n            <totallen>0</totallen>\n            <attachid></attachid>\n            <fileext></fileext>\n        </appattach>\n        <extinfo></extinfo>\n        <mmreader>\n            <category type="20" count="4">\n                <name><![CDATA[PingWest品玩]]></name>\n                <topnew>\n                    <cover><![CDATA[http://mmbiz.qpic.cn/mmbiz_jpg/EfY115GicZB5kNjs6RHxsOfx7YjR7D1sUZyexqDpeRyfHMDMhXhqYp6ZW9rM49YKPOrdmy5da7C6tQicQMVH1Olg/640?wxtype=jpeg&wxfrom=0]]></cover>\n                    <width>0</width>\n                    <height>0</height>\n                    <digest><![CDATA[]]></digest>\n                </topnew>\n                \n                <item>\n                    <itemshowtype>0</itemshowtype>\n                    <title><![CDATA[任天堂居然出了一款氪金手游,不仅很良心还挺好玩]]></title>\n                    <url><![CDATA[http://mp.weixin.qq.com/s?__biz=MjM5MjM3NzQwMA==&mid=2650980804&idx=1&sn=17d3cc681ef18387aff3a39b5af9ec95&chksm=bd515e938a26d785f24bb03fb2df3e25e25afe24d75a6a7ae38caeb97a5097b696dc9b2d2b33&scene=0#rd]]></url>\n                    <shorturl><![CDATA[]]></shorturl>\n                    <longurl><![CDATA[]]></longurl>\n                    <pub_time>1486780488</pub_time>\n                    <cover><![CDATA[http://mmbiz.qpic.cn/mmbiz_jpg/EfY115GicZB5kNjs6RHxsOfx7YjR7D1sUZyexqDpeRyfHMDMhXhqYp6ZW9rM49YKPOrdmy5da7C6tQicQMVH1Olg/640?wxtype=jpeg&wxfrom=0]]></cover>\n                    <tweetid></tweetid>\n                    <digest><![CDATA[那个曾经骄傲的任天堂,终于低下头颅,踏踏实实地赚钱了。]]></digest>\n                    <fileid>503497142</fileid>\n                    <sources>\n                        <source>\n                            <name><![CDATA[PingWest品玩]]></name>\n                        </source>\n                    </sources>\n                    <styles></styles>\n                    <native_url></native_url>\n                    <del_flag>0</del_flag>\n                    <contentattr>1</contentattr>\n                    <play_length>0</play_length>\n                </item>\n                \n                <item>\n                    <itemshowtype>0</itemshowtype>\n                    <title><![CDATA[别的公司还在砸钱投资人工智能时,英伟达已经因为这项技术赚翻了]]></title>\n                    <url><![CDATA[http://mp.weixin.qq.com/s?__biz=MjM5MjM3NzQwMA==&mid=2650980804&idx=2&sn=c656adb3a9210048d6c7036212f587a6&chksm=bd515e938a26d7854ee7e80e3015553ac80df755064d10fa9ac4287c631ebf7dee309ca9031f&scene=0#rd]]></url>\n                    <shorturl><![CDATA[]]></shorturl>\n                    <longurl><![CDATA[]]></longurl>\n                    <pub_time>1486780488</pub_time>\n                    <cover><![CDATA[http://mmbiz.qpic.cn/mmbiz_jpg/EfY115GicZB5kNjs6RHxsOfx7YjR7D1sU6mvr787YOrZhaxm4a6gBzLfpypjI0MpoZV9XkwNWl2icUZsibJajIDyw/300?wxtype=jpeg&wxfrom=0]]></cover>\n                    <tweetid></tweetid>\n                    <digest><![CDATA[黄仁勋的话可以翻译成:我们的股票你可拿好了,过几年包你赚翻……]]></digest>\n                    <fileid>503497149</fileid>\n                    <sources>\n                        <source>\n                            <name><![CDATA[PingWest品玩]]></name>\n                        </source>\n                    </sources>\n                    <styles></styles>\n                    <native_url></native_url>\n                    <del_flag>0</del_flag>\n                    <contentattr>1</contentattr>\n                    <play_length>0</play_length>\n                </item>\n                \n                <item>\n                    <itemshowtype>0</itemshowtype>\n                    <title><![CDATA[什么?Google居然还惦记着做手表?]]></title>\n                    <url><![CDATA[http://mp.weixin.qq.com/s?__biz=MjM5MjM3NzQwMA==&mid=2650980804&idx=3&sn=db10bee7a5f2ab6d6a49e22a87b23859&chksm=bd515e938a26d7855ee1ecca1eb8c097675207c9af2b749916c8d051963ee70b8490e888492b&scene=0#rd]]></url>\n                    <shorturl><![CDATA[]]></shorturl>\n                    <longurl><![CDATA[]]></longurl>\n                    <pub_time>1486780488</pub_time>\n                    <cover><![CDATA[http://mmbiz.qpic.cn/mmbiz_jpg/EfY115GicZB5kNjs6RHxsOfx7YjR7D1sUNloCpJDwAJR03VxunibA3DIuEC1zf6jutfBKibibiaV5ZOgEyMgaQVJ4mg/300?wxtype=jpg/EfY115&wxfrom=0]]></cover>\n                    <tweetid></tweetid>\n                    <digest><![CDATA[你买或不买,Android Wear 的新手表都在那里。]]></digest>\n                    <fileid>0</fileid>\n                    <sources>\n                        <source>\n                            <name><![CDATA[PingWest品玩]]></name>\n                        </source>\n                    </sources>\n                    <styles></styles>\n                    <native_url></native_url>\n                    <del_flag>0</del_flag>\n                    <contentattr>1</contentattr>\n                    <play_length>0</play_length>\n                </item>\n                \n                <item>\n                    <itemshowtype>0</itemshowtype>\n                    <title><![CDATA[NoPing 一周精选:您的粉丝受教育程度高,理性消费,所以不值什么钱]]></title>\n                    <url><![CDATA[http://mp.weixin.qq.com/s?__biz=MjM5MjM3NzQwMA==&mid=2650980804&idx=4&sn=fe2c7a5e5cbf6b71fa0bf18b21f10876&chksm=bd515e938a26d785efaf2073fb90a26c78d9bebc829157aeb76d0cd600112104e354f247a2bd&scene=0#rd]]></url>\n                    <shorturl><![CDATA[]]></shorturl>\n                    <longurl><![CDATA[]]></longurl>\n                    <pub_time>1486780488</pub_time>\n                    <cover><![CDATA[http://mmbiz.qpic.cn/mmbiz_jpg/EfY115GicZB5kNjs6RHxsOfx7YjR7D1sUnMMIFqJlX4zHfnXLPibNicjIKdU8oBnvrbSp2sQnas4f3WzZWLT9pqng/300?wxtype=jpeg&wxfrom=0]]></cover>\n                    <tweetid></tweetid>\n                    <digest><![CDATA[泥嚎!这里是品玩的新节目——NoPingWest 精选]]></digest>\n                    <fileid>503497155</fileid>\n                    <sources>\n                        <source>\n                            <name><![CDATA[PingWest品玩]]></name>\n                        </source>\n                    </sources>\n                    <styles></styles>\n                    <native_url></native_url>\n                    <del_flag>0</del_flag>\n                    <contentattr>1</contentattr>\n                    <play_length>0</play_length>\n                </item>\n                \n            </category>\n            <publisher>\n                <username><![CDATA[gh_63e439b69de5]]></username>\n                <nickname><![CDATA[PingWest品玩]]></nickname>\n            </publisher>\n            <template_header></template_header>\n            <template_detail></template_detail>\n            <forbid_forward>0</forbid_forward>\n        </mmreader>\n        <thumburl><![CDATA[http://mmbiz.qpic.cn/mmbiz_jpg/EfY115GicZB5kNjs6RHxsOfx7YjR7D1sUZyexqDpeRyfHMDMhXhqYp6ZW9rM49YKPOrdmy5da7C6tQicQMVH1Olg/640?wxtype=jpeg&wxfrom=0]]></thumburl>\n    </appmsg>\n    <fromusername><![CDATA[gh_63e439b69de5]]></fromusername>\n    <appinfo>\n        <version></version>\n        <appname><![CDATA[PingWest品玩]]></appname>\n        <isforceupdate>1</isforceupdate>\n    </appinfo>\n    \n    \n    \n    \n    \n    \n</msg>', 'StatusNotifyCode': 0, 'FromUserName': '@44a6b70e2c300aad7295643247a6c818', 'ForwardFlag': 0, 'ImgHeight': 0, 'NewMsgId': 7668771430353908548, 'Text': '任天堂居然出了一款氪金手游,不仅很良心还挺好玩', 'CreateTime': 1486780495, 'MsgId': '7668771430353908548', 'Status': 3, 'RecommendInfo': {'QQNum': 0, 'OpCode': 0, 'VerifyFlag': 0, 'City': '', 'Scene': 0, 'Ticket': '', 'Content': '', 'Alias': '', 'Province': '', 'Sex': 0, 'UserName': '', 'NickName': '', 'AttrStatus': 0, 'Signature': ''}, 'MediaId': '', 'AppInfo': {'AppID': '', 'Type': 0}, 'FileSize': '0', 'Type': 'Sharing', 'ImgStatus': 1, 'OriContent': '', 'FileName': '任天堂居然出了一款氪金手游,不仅很良心还挺好玩', 'ToUserName': '@099639dbd19fabc188880a2c66c32d7c', 'ImgWidth': 0, 'SubMsgType': 0, 'MsgType': 49}
2017-02-11 10:34:57,555: plugins.eh_wechat_slave.incomeMsgMeta [DEBUG]
    Raw message: {'HasProductId': 0, 'VoiceLength': 0, 'StatusNotifyUserName': '', 'AppMsgType': 5, 'Url': 'http://mp.weixin.qq.com/s?__biz=MjM5MjM3NzQwMA==&amp;mid=2650980804&amp;idx=1&amp;sn=17d3cc681ef18387aff3a39b5af9ec95&amp;chksm=bd515e938a26d785f24bb03fb2df3e25e25afe24d75a6a7ae38caeb97a5097b696dc9b2d2b33&amp;scene=0#rd', 'PlayLength': 0, 'Ticket': '', 'Content': '<msg>\n    <appmsg appid="" sdkver="0">\n        <title><![CDATA[任天堂居然出了一款氪金手游,不仅很良心还挺好玩]]></title>\n        <des><![CDATA[那个曾经骄傲的任天堂,终于低下头颅,踏踏实实地赚钱了。]]></des>\n        <action></action>\n        <type>5</type>\n        <showtype>1</showtype>\n        <content><![CDATA[]]></content>\n        <contentattr>1</contentattr>\n        <url><![CDATA[http://mp.weixin.qq.com/s?__biz=MjM5MjM3NzQwMA==&mid=2650980804&idx=1&sn=17d3cc681ef18387aff3a39b5af9ec95&chksm=bd515e938a26d785f24bb03fb2df3e25e25afe24d75a6a7ae38caeb97a5097b696dc9b2d2b33&scene=0#rd]]></url>\n        <lowurl><![CDATA[]]></lowurl>\n        <appattach>\n            <totallen>0</totallen>\n            <attachid></attachid>\n            <fileext></fileext>\n        </appattach>\n        <extinfo></extinfo>\n        <mmreader>\n            <category type="20" count="4">\n                <name><![CDATA[PingWest品玩]]></name>\n                <topnew>\n                    <cover><![CDATA[http://mmbiz.qpic.cn/mmbiz_jpg/EfY115GicZB5kNjs6RHxsOfx7YjR7D1sUZyexqDpeRyfHMDMhXhqYp6ZW9rM49YKPOrdmy5da7C6tQicQMVH1Olg/640?wxtype=jpeg&wxfrom=0]]></cover>\n                    <width>0</width>\n                    <height>0</height>\n                    <digest><![CDATA[]]></digest>\n                </topnew>\n                \n                <item>\n                    <itemshowtype>0</itemshowtype>\n                    <title><![CDATA[任天堂居然出了一款氪金手游,不仅很良心还挺好玩]]></title>\n                    <url><![CDATA[http://mp.weixin.qq.com/s?__biz=MjM5MjM3NzQwMA==&mid=2650980804&idx=1&sn=17d3cc681ef18387aff3a39b5af9ec95&chksm=bd515e938a26d785f24bb03fb2df3e25e25afe24d75a6a7ae38caeb97a5097b696dc9b2d2b33&scene=0#rd]]></url>\n                    <shorturl><![CDATA[]]></shorturl>\n                    <longurl><![CDATA[]]></longurl>\n                    <pub_time>1486780488</pub_time>\n                    <cover><![CDATA[http://mmbiz.qpic.cn/mmbiz_jpg/EfY115GicZB5kNjs6RHxsOfx7YjR7D1sUZyexqDpeRyfHMDMhXhqYp6ZW9rM49YKPOrdmy5da7C6tQicQMVH1Olg/640?wxtype=jpeg&wxfrom=0]]></cover>\n                    <tweetid></tweetid>\n                    <digest><![CDATA[那个曾经骄傲的任天堂,终于低下头颅,踏踏实实地赚钱了。]]></digest>\n                    <fileid>503497142</fileid>\n                    <sources>\n                        <source>\n                            <name><![CDATA[PingWest品玩]]></name>\n                        </source>\n                    </sources>\n                    <styles></styles>\n                    <native_url></native_url>\n                    <del_flag>0</del_flag>\n                    <contentattr>1</contentattr>\n                    <play_length>0</play_length>\n                </item>\n                \n                <item>\n                    <itemshowtype>0</itemshowtype>\n                    <title><![CDATA[别的公司还在砸钱投资人工智能时,英伟达已经因为这项技术赚翻了]]></title>\n                    <url><![CDATA[http://mp.weixin.qq.com/s?__biz=MjM5MjM3NzQwMA==&mid=2650980804&idx=2&sn=c656adb3a9210048d6c7036212f587a6&chksm=bd515e938a26d7854ee7e80e3015553ac80df755064d10fa9ac4287c631ebf7dee309ca9031f&scene=0#rd]]></url>\n                    <shorturl><![CDATA[]]></shorturl>\n                    <longurl><![CDATA[]]></longurl>\n                    <pub_time>1486780488</pub_time>\n                    <cover><![CDATA[http://mmbiz.qpic.cn/mmbiz_jpg/EfY115GicZB5kNjs6RHxsOfx7YjR7D1sU6mvr787YOrZhaxm4a6gBzLfpypjI0MpoZV9XkwNWl2icUZsibJajIDyw/300?wxtype=jpeg&wxfrom=0]]></cover>\n                    <tweetid></tweetid>\n                    <digest><![CDATA[黄仁勋的话可以翻译成:我们的股票你可拿好了,过几年包你赚翻……]]></digest>\n                    <fileid>503497149</fileid>\n                    <sources>\n                        <source>\n                            <name><![CDATA[PingWest品玩]]></name>\n                        </source>\n                    </sources>\n                    <styles></styles>\n                    <native_url></native_url>\n                    <del_flag>0</del_flag>\n                    <contentattr>1</contentattr>\n                    <play_length>0</play_length>\n                </item>\n                \n                <item>\n                    <itemshowtype>0</itemshowtype>\n                    <title><![CDATA[什么?Google居然还惦记着做手表?]]></title>\n                    <url><![CDATA[http://mp.weixin.qq.com/s?__biz=MjM5MjM3NzQwMA==&mid=2650980804&idx=3&sn=db10bee7a5f2ab6d6a49e22a87b23859&chksm=bd515e938a26d7855ee1ecca1eb8c097675207c9af2b749916c8d051963ee70b8490e888492b&scene=0#rd]]></url>\n                    <shorturl><![CDATA[]]></shorturl>\n                    <longurl><![CDATA[]]></longurl>\n                    <pub_time>1486780488</pub_time>\n                    <cover><![CDATA[http://mmbiz.qpic.cn/mmbiz_jpg/EfY115GicZB5kNjs6RHxsOfx7YjR7D1sUNloCpJDwAJR03VxunibA3DIuEC1zf6jutfBKibibiaV5ZOgEyMgaQVJ4mg/300?wxtype=jpg/EfY115&wxfrom=0]]></cover>\n                    <tweetid></tweetid>\n                    <digest><![CDATA[你买或不买,Android Wear 的新手表都在那里。]]></digest>\n                    <fileid>0</fileid>\n                    <sources>\n                        <source>\n                            <name><![CDATA[PingWest品玩]]></name>\n                        </source>\n                    </sources>\n                    <styles></styles>\n                    <native_url></native_url>\n                    <del_flag>0</del_flag>\n                    <contentattr>1</contentattr>\n                    <play_length>0</play_length>\n                </item>\n                \n                <item>\n                    <itemshowtype>0</itemshowtype>\n                    <title><![CDATA[NoPing 一周精选:您的粉丝受教育程度高,理性消费,所以不值什么钱]]></title>\n                    <url><![CDATA[http://mp.weixin.qq.com/s?__biz=MjM5MjM3NzQwMA==&mid=2650980804&idx=4&sn=fe2c7a5e5cbf6b71fa0bf18b21f10876&chksm=bd515e938a26d785efaf2073fb90a26c78d9bebc829157aeb76d0cd600112104e354f247a2bd&scene=0#rd]]></url>\n                    <shorturl><![CDATA[]]></shorturl>\n                    <longurl><![CDATA[]]></longurl>\n                    <pub_time>1486780488</pub_time>\n                    <cover><![CDATA[http://mmbiz.qpic.cn/mmbiz_jpg/EfY115GicZB5kNjs6RHxsOfx7YjR7D1sUnMMIFqJlX4zHfnXLPibNicjIKdU8oBnvrbSp2sQnas4f3WzZWLT9pqng/300?wxtype=jpeg&wxfrom=0]]></cover>\n                    <tweetid></tweetid>\n                    <digest><![CDATA[泥嚎!这里是品玩的新节目——NoPingWest 精选]]></digest>\n                    <fileid>503497155</fileid>\n                    <sources>\n                        <source>\n                            <name><![CDATA[PingWest品玩]]></name>\n                        </source>\n                    </sources>\n                    <styles></styles>\n                    <native_url></native_url>\n                    <del_flag>0</del_flag>\n                    <contentattr>1</contentattr>\n                    <play_length>0</play_length>\n                </item>\n                \n            </category>\n            <publisher>\n                <username><![CDATA[gh_63e439b69de5]]></username>\n                <nickname><![CDATA[PingWest品玩]]></nickname>\n            </publisher>\n            <template_header></template_header>\n            <template_detail></template_detail>\n            <forbid_forward>0</forbid_forward>\n        </mmreader>\n        <thumburl><![CDATA[http://mmbiz.qpic.cn/mmbiz_jpg/EfY115GicZB5kNjs6RHxsOfx7YjR7D1sUZyexqDpeRyfHMDMhXhqYp6ZW9rM49YKPOrdmy5da7C6tQicQMVH1Olg/640?wxtype=jpeg&wxfrom=0]]></thumburl>\n    </appmsg>\n    <fromusername><![CDATA[gh_63e439b69de5]]></fromusername>\n    <appinfo>\n        <version></version>\n        <appname><![CDATA[PingWest品玩]]></appname>\n        <isforceupdate>1</isforceupdate>\n    </appinfo>\n    \n    \n    \n    \n    \n    \n</msg>', 'StatusNotifyCode': 0, 'FromUserName': '@44a6b70e2c300aad7295643247a6c818', 'ForwardFlag': 0, 'ImgHeight': 0, 'NewMsgId': 7668771430353908548, 'Text': '任天堂居然出了一款氪金手游,不仅很良心还挺好玩', 'CreateTime': 1486780495, 'MsgId': '7668771430353908548', 'Status': 3, 'RecommendInfo': {'QQNum': 0, 'OpCode': 0, 'VerifyFlag': 0, 'City': '', 'Scene': 0, 'Ticket': '', 'Content': '', 'Alias': '', 'Province': '', 'Sex': 0, 'UserName': '', 'NickName': '', 'AttrStatus': 0, 'Signature': ''}, 'MediaId': '', 'AppInfo': {'AppID': '', 'Type': 0}, 'FileSize': '0', 'Type': 'Sharing', 'ImgStatus': 1, 'OriContent': '', 'FileName': '任天堂居然出了一款氪金手游,不仅很良心还挺好玩', 'ToUserName': '@099639dbd19fabc188880a2c66c32d7c', 'ImgWidth': 0, 'SubMsgType': 0, 'MsgType': 49}
2017-02-11 10:34:57,556: plugins.eh_wechat_slave.incomeMsgMeta [DEBUG]
    me, False
2017-02-11 10:34:57,649: plugins.eh_wechat_slave.incomeMsgMeta [DEBUG]
    From user, {'StarFriend': 0, 'VerifyFlag': 24, 'RemarkPYQuanPin': '', 'ContactFlag': 3, 'HeadImgUrl': '/cgi-bin/mmwebwx-bin/webwxgeticon?seq=638470901&username=@44a6b70e2c300aad7295643247a6c818&skey=@crypt_2fa3b0c2_45d54f26c3251d78772b6fc6a5740c08', 'Alias': 'wepingwest', 'RemarkName': '', 'MemberCount': 0, 'Sex': 0, 'MemberList': [], 'AppAccountFlag': 0, 'ChatRoomId': 0, 'NickName': 'PingWest品玩', 'Signature': '有品好玩的科技,一切与你有关', 'City': '海淀', 'EncryChatRoomId': '', 'UniFriend': 0, 'DisplayName': '', 'HideInputBarFlag': 0, 'SnsFlag': 0, 'Statues': 0, 'PYQuanPin': 'PingWestpinwan', 'Uin': 0, 'IsOwner': 0, 'OwnerUin': 0, 'KeyWord': 'gh_', 'RemarkPYInitial': '', 'Province': '北京', 'PYInitial': 'PINGWESTPW', 'AttrStatus': 0, 'UserName': '@44a6b70e2c300aad7295643247a6c818'}
2017-02-11 10:34:57,732: plugins.eh_wechat_slave.incomeMsgMeta [DEBUG]
    dest: {'alias': 'xxx', 'uid': 'uid', 'name': 'xxx'}
2017-02-11 10:34:57,732: plugins.eh_wechat_slave.incomeMsgMeta [INFO]
    WeChat incoming message:
Type: Link
Text: 任天堂居然出了一款氪金手游,不仅很良心还挺好玩
UserName: @44a6b70e2c300aad7295643247a6c818
uid: 2482179027
name: PingWest品玩

image

Send QR codes to Telegram master channel

The WeChat slave needs rescanning the QR code every several days. It is painful because the QR is only thrown into the command line, and I'll have to ssh onto the server for rescanning every time. It will be more convenient if the slave can forward the QR code to Telegram master channel so that I can just save & scan from WeChat.

Ignore chats

Not every messages on WeChat worth to forward (e.g. groups of relatives...). Since #9 is not achieved, currently I have to create a vast number of tg groups, link WeChat groups with them and mute them individually.

It would great if we could have a /ignore command from wechat slave channel, use same selecting progress as /chat but ignore their messages instead of starting a new chat. Of course we also need another command to undo the operation...

Bad Request: message can't be edited

When occurred, Cannot receive message.

plugins.eh_telegram_master.TelegramChannel [ERROR]
    BadRequest()Traceback (most recent call last):
  File "/opt/ehForwarderBot/plugins/eh_telegram_master/__init__.py", line 309, in process_msg
    parse_mode=parse_mode)
  File "/usr/lib/python3.6/site-packages/telegram/bot.py", line 125, in decorator
    result = func(self, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/telegram/bot.py", line 151, in decorator
    result = self._request.post(url, data, timeout=kwargs.get('timeout'))
  File "/usr/lib/python3.6/site-packages/telegram/utils/request.py", line 207, in post
    **urlopen_kwargs)
  File "/usr/lib/python3.6/site-packages/telegram/utils/request.py", line 152, in _request_wrapper
    raise BadRequest(repr(message))
telegram.error.BadRequest: "Bad Request: message can't be edited"

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/ehForwarderBot/plugins/eh_telegram_master/__init__.py", line 313, in process_msg
    text=msg_template + msg.text)
  File "/usr/lib/python3.6/site-packages/telegram/bot.py", line 125, in decorator
    result = func(self, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/telegram/bot.py", line 151, in decorator
    result = self._request.post(url, data, timeout=kwargs.get('timeout'))
  File "/usr/lib/python3.6/site-packages/telegram/utils/request.py", line 207, in post
    **urlopen_kwargs)
  File "/usr/lib/python3.6/site-packages/telegram/utils/request.py", line 152, in _request_wrapper
    raise BadRequest(repr(message))
telegram.error.BadRequest: "Bad Request: message can't be edited"

Telegram端无法发送消息

【表现】
持续运行数天后,随机出现telegram.error.TelegramError: Invalid server response错误,表现为telegram可以接收到WeChat消息,但无法发送消息(即:Telegram端显示消息已读,WeChat实际没发出去)。
重启ehForwarderBot后立刻恢复正常。如果不重启,将会长时间保持无法发送消息的状态。
未观察到该错误与某些操作有确定性关联。

尝试更换了服务器(从新加坡换到了洛杉矶),似乎并没有效果。

【环境】
ehForwarderBot版本:1.6.1
Python版本:3.6.1
OS:alpine edge
Docker镜像:gaoyifan/ehforwarderbot

【错误日志】

Exception in thread dispatcher:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/telegram/utils/request.py", line 98, in _parse
    data = json.loads(decoded_s)
  File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

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 "/usr/lib/python3.6/site-packages/telegram/ext/updater.py", line 115, in _thread_wrapper
    target(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/telegram/ext/dispatcher.py", line 219, in start
    self.process_update(update)
  File "/usr/lib/python3.6/site-packages/telegram/ext/dispatcher.py", line 263, in process_update
    self.dispatch_error(None, update)
  File "/usr/lib/python3.6/site-packages/telegram/ext/dispatcher.py", line 374, in dispatch_error
    callback(self.bot, update, error)
  File "/opt/ehForwarderBot/plugins/eh_telegram_master/__init__.py", line 1638, in error
    (html.escape(str(error)), html.escape(str(update))))
  File "/usr/lib/python3.6/site-packages/telegram/bot.py", line 125, in decorator
    result = func(self, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/telegram/bot.py", line 151, in decorator
    result = self._request.post(url, data, timeout=kwargs.get('timeout'))
  File "/usr/lib/python3.6/site-packages/telegram/utils/request.py", line 207, in post
    **urlopen_kwargs)
  File "/usr/lib/python3.6/site-packages/telegram/utils/request.py", line 145, in _request_wrapper
    message = self._parse(resp.data)
  File "/usr/lib/python3.6/site-packages/telegram/utils/request.py", line 100, in _parse
    raise TelegramError('Invalid server response')
telegram.error.TelegramError: Invalid server response

完整日志:
ehforwarderbot.log.txt

Error: group name with '&', or sth. else with '&'

2017-01-21 11:23:00,758: telegram.ext.updater [ERROR]
    Error while getting Updates: Invalid server response
2017-01-21 11:23:00,759: telegram.ext.updater [ERROR]
    unhandled exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/site-packages/telegram/ext/updater.py", line 115, in _thread_wrapper
    target(*args, **kwargs)
  File "/usr/local/lib/python3.5/site-packages/telegram/ext/dispatcher.py", line 219, in start
    self.process_update(update)
  File "/usr/local/lib/python3.5/site-packages/telegram/ext/dispatcher.py", line 263, in process_update
    self.dispatch_error(None, update)
  File "/usr/local/lib/python3.5/site-packages/telegram/ext/dispatcher.py", line 374, in dispatch_error
    callback(self.bot, update, error)
  File "/root/ehForwarderBot/plugins/eh_telegram_master/__init__.py", line 1186, in error
    (html.escape(error), html.escape(update)))
  File "/usr/local/lib/python3.5/html/__init__.py", line 19, in escape
    s = s.replace("&", "&amp;") # Must be done first!
AttributeError: 'TelegramError' object has no attribute 'replace'
Exception in thread dispatcher:
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/threading.py", line 923, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.5/threading.py", line 871, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.5/site-packages/telegram/ext/updater.py", line 115, in _thread_wrapper
    target(*args, **kwargs)
  File "/usr/local/lib/python3.5/site-packages/telegram/ext/dispatcher.py", line 219, in start
    self.process_update(update)
  File "/usr/local/lib/python3.5/site-packages/telegram/ext/dispatcher.py", line 263, in process_update
    self.dispatch_error(None, update)
  File "/usr/local/lib/python3.5/site-packages/telegram/ext/dispatcher.py", line 374, in dispatch_error
    callback(self.bot, update, error)
  File "/root/ehForwarderBot/plugins/eh_telegram_master/__init__.py", line 1186, in error
    (html.escape(error), html.escape(update)))
  File "/usr/local/lib/python3.5/html/__init__.py", line 19, in escape
    s = s.replace("&", "&amp;") # Must be done first!

登陆成功但无法接收消息

配置成功后,也扫描了二维码,显示登录成功
Successfully authorized.

接着弹出:
Traceback (most recent call last): File "main.py", line 131, in <module> init() File "main.py", line 88, in init q, mutex, slaves) File "/home/rsa-key-20170406/ehForwarderBot/plugins/eh_telegram_master/__init__.py", line 122, in __init__ self.me = self.bot.bot.get_me() File "/home/rsa-key-20170406/.local/lib/python3.5/site-packages/telegram/bot.py", line 125, in decorator result = func(self, *args, **kwargs) File "/home/rsa-key-20170406/.local/lib/python3.5/site-packages/telegram/bot.py", line 174, in getMe result = self._request.get(url) File "/home/rsa-key-20170406/.local/lib/python3.5/site-packages/telegram/utils/request.py", line 170, in get result = self._request_wrapper('GET', url) File "/home/rsa-key-20170406/.local/lib/python3.5/site-packages/telegram/utils/request.py", line 150, in _request_wrapper raise Unauthorized() telegram.error.Unauthorized: Unauthorized

试了试发了消息没反应

EWS times out after 12 hours of inactivity

I've written a eh_hipchat_master plugin which I'm using to bridge to WeChat, and I'm seeing the WeChat connection time out consistently after 12 hours of inactivity.

I haven't tried to use ehForwarderBot with the Telegram master, so I'm not aware of the same is the case when using that, but I was wondering if it would make sense to make a keep alive system for WeChat, so it for instance sends a message to the File Helper user at a set interval, in order to avoid it being disconnected? It seems like that also could solve the problem another user reported in #37.

If it's not a problem when using the Telegram master, I could instead just add a keep alive message being sent from the Hipchat master, but it seems a bit odd since it's not related to the Hipchat part at all.

SyntaxError when running the bot

When I tried to run the bot, I got the error below:

Traceback (most recent call last):
  File "main.py", line 107, in <module>
    init()
  File "main.py", line 60, in init
    obj = getattr(__import__(i[0], fromlist=i[1]), i[1])
  File "/root/github/ehForwarderBot/plugins/eh_wechat_slave.py", line 413
    txt = txt.format({**msg['Text'], **msg['Text']['userInfo']})
                       ^
SyntaxError: invalid syntax

Then I just deleted the ** before the msg in the inner dict and the bot ran properly.


Also, it seems that photos and files cannot be sent at this moment, not sure if it is caused by the editing of the code.

OSError: cannot identify image file 'storage/eh_telegram_master/...'

This error occurred when I want to send a Telegram's sticker.
OS:

Distributor ID:	Ubuntu
Description:	Ubuntu 14.04.5 LTS
Release:	14.04
Codename:	trusty
hardware-platform : 86_64 GNU/Linux
  • I can receive all messages from Wechat included texts and images.
  • I can send text messages in Telegram.
  • All dependencies may prepared.

Here is the log when I want to send a Telegram's sticker:

2017-04-27 08:09:45,902: telegram.ext.dispatcher [ERROR]
    An uncaught error was raised while processing the update
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/telegram/ext/dispatcher.py", line 270, in process_update
    handler.handle_update(update, self)
  File "/usr/local/lib/python3.4/dist-packages/telegram/ext/messagehandler.py", line 123, in handle_update
    return self.callback(dispatcher.bot, update, **optional_args)
  File "/home/a/ehForwarderBot/plugins/eh_telegram_master/__init__.py", line 1128, in msg
    return self.process_telegram_message(bot, update)
  File "/home/a/ehForwarderBot/plugins/eh_telegram_master/__init__.py", line 1340, in process_telegram_message
    slave_msg = self.slaves[channel].send_message(m)
  File "/home/a/ehForwarderBot/plugins/eh_wechat_slave.py", line 666, in send_message
    img = Image.open(msg.path)
  File "/usr/local/lib/python3.4/dist-packages/PIL/Image.py", line 2452, in open
    % (filename if filename else fp))
OSError: cannot identify image file 'storage/eh_telegram_master/Sticker_-160796490_330_1493251785.obj'

My English is poor. Here is the Chinese version:

当我发送 Telegram 的贴纸的时候,发生了这个错误。
当程序启动之后,我可以正常接收来自微信的一切消息,包括表情、文字以及图片等。
我也可以从 Telegram 发送文字消息,但是无法发送贴图或者图片

Thanks!

/link 的时候报错。

执行命令 /link 的时候报下面的错误:

2017-03-08 10:27:01,948: telegram.ext.dispatcher [ERROR]
An uncaught error was raised while processing the update
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/telegram/ext/dispatcher.py", line 270, in process_update
handler.handle_update(update, self)
File "/usr/local/lib/python3.4/dist-packages/telegram/ext/commandhandler.py", line 100, in handle_update
return self.callback(dispatcher.bot, update, **optional_args)
File "/srv/approot/ehForwarderBot/plugins/eh_telegram_master/init.py", line 671, in link_chat_show_list
self.link_chat_gen_list(bot, update.message.from_user.id, filter=" ".join(args))
File "/srv/approot/ehForwarderBot/plugins/eh_telegram_master/init.py", line 697, in link_chat_gen_list
fchats=chats)
File "/srv/approot/ehForwarderBot/plugins/eh_telegram_master/init.py", line 532, in slave_chats_pagination
slave_chats = slave.get_chats()
File "/srv/approot/ehForwarderBot/plugins/eh_wechat_slave.py", line 899, in get_chats
Uin=i.get("Uin", None)),
File "/srv/approot/ehForwarderBot/plugins/eh_wechat_slave.py", line 255, in get_uid
data = {"nickname": r[0]['NickName'], "alias": r[0]["RemarkName"], "uin": r[0]["Uin"]}
KeyError: 'Uin'

Failed to unlink Wechat user

If you quit the Telegram group before unlink the Wechat user, you can't unlink this Wechat user lately.
There is still chance that you can't unlink wechat users, even that you have never create any groups for them.

some Link type message raise TypeError

2017-01-22 01:10:07,144: plugins.eh_wechat_slave.WeChatChannel [INFO]
    ---
New Link msg, {'StatusNotifyUserName': '', 'AppMsgType': 5, 'VoiceLength': 0, 'Type': 'Sharing', 'MsgId': '***', 'ImgStatus': 1, 'FromUserName': '@***', 'ImgWidth': 0, 'Url': '', 'RecommendInfo': {'NickName': '', 'Province': '', 'Scene': 0, 'Content': '', 'VerifyFlag': 0, 'AttrStatus': 0, 'Alias': '', 'OpCode': 0, 'Ticket': '', 'City': '', 'Sex': 0, 'QQNum': 0, 'UserName': '', 'Signature': ''}, 'ToUserName': '@***', 'HasProductId': 0, 'MsgType': 49, 'NewMsgId': ***, 'FileName': '交易提醒', 'Ticket': '', 'PlayLength': 0, 'Content': '<msg> <appmsg appid="" sdkver="0"> \t<title><![CDATA[交易提醒]]></title> \t<des><![CDATA[\r\n尊敬的客户:\r\n您的华夏卡****最近交易信息\n\n\n交易时间:22日01时09分\n交易类型:银联银联代付\n交易金额:收款 人民币 ***元\n\r\n您的华夏卡余额为人民币***元。如有疑问,请立即致电***。]]></des> \t<action></action> \t<type>5</type> \t<showtype>1</showtype>     <soundtype>0</soundtype> \t<content><![CDATA[]]></content> \t<contentattr>0</contentattr> \t<url><![CDATA[]]></url> \t<lowurl><![CDATA[]]></lowurl> \t<appattach> \t\t<totallen>0</totallen> \t\t<attachid></attachid> \t\t<fileext></fileext> \t</appattach> \t<extinfo></extinfo> \t<mmreader> \t\t<category type="0" count="1"> \t\t\t<name><![CDATA[华夏银行]]></name> \t\t\t<topnew> \t\t\t\t<cover><![CDATA[]]></cover> \t\t\t\t<width>0</width> \t\t\t\t<height>0</height> \t\t\t\t<digest><![CDATA[\r\n尊敬的客户:\r\n您的华夏卡****最近交易信息\n\n\n交易时间:22日01时09分\n交易类型:银联银联代付\n交易金额:收款 人民币 ***元\n\r\n您的华夏卡余额为人民币***元。如有疑问,请立即致电***。]]></digest> \t\t\t</topnew> \t\t\t\t<item> \t<itemshowtype>4</itemshowtype> \t<title><![CDATA[交易提醒]]></title> \t<url><![CDATA[]]></url> \t<shorturl><![CDATA[]]></shorturl> \t<longurl><![CDATA[]]></longurl> \t<pub_time>1485018604</pub_time> \t<cover><![CDATA[]]></cover> \t<tweetid></tweetid> \t<digest><![CDATA[\r\n尊敬的客户:\r\n您的华夏卡****最近交易信息\n\n\n交易时间:22日01时09分\n交易类型:银联银联代付\n交易金额:收款 人民币 ***元\n\r\n您的华夏卡余额为人民币***元。如有疑问,请立即致电***。]]></digest> \t<fileid>0</fileid> \t<sources> \t<source> \t<name><![CDATA[华夏银行]]></name> \t</source> \t</sources> \t<styles><topColor><![CDATA[#FFFFFF]]></topColor>\n<style>\n<range><![CDATA[{0,26}]]></range>\n<font><![CDATA[s]]></font>\n<color><![CDATA[#000000]]></color>\n</style>\n<style>\n<range><![CDATA[{34,9}]]></range>\n<font><![CDATA[s]]></font>\n<color><![CDATA[#000000]]></color>\n</style>\n<style>\n<range><![CDATA[{49,6}]]></range>\n<font><![CDATA[s]]></font>\n<color><![CDATA[#000000]]></color>\n</style>\n<style>\n<range><![CDATA[{61,14}]]></range>\n<font><![CDATA[s]]></font>\n<color><![CDATA[#0000FF]]></color>\n</style>\n<style>\n<range><![CDATA[{76,39}]]></range>\n<font><![CDATA[s]]></font>\n<color><![CDATA[#000000]]></color>\n</style>\n</styles>\t<native_url></native_url>    <del_flag>0</del_flag>     <contentattr>0</contentattr>     <play_length>0</play_length> \t<play_url></play_url> \t<player><![CDATA[]]></player> \t</item> \t\t</category> \t\t<publisher> \t\t\t<username><![CDATA[hxwxgzzh]]></username> \t\t\t<nickname><![CDATA[华夏银行]]></nickname> \t\t</publisher> \t\t<template_header></template_header> \t\t<template_detail></template_detail> \t    <forbid_forward>0</forbid_forward> \t</mmreader> \t<thumburl><![CDATA[]]></thumburl> \t     <template_id><![CDATA[***]]></template_id>                     </appmsg><fromusername><![CDATA[gh_***]]></fromusername><appinfo><version>0</version><appname><![CDATA[华夏银行]]></appname><isforceupdate>1</isforceupdate></appinfo></msg>', 'AppInfo': {'Type': 0, 'AppID': ''}, 'SubMsgType': 0, 'FileSize': '0', 'CreateTime': 1485018604, 'ImgHeight': 0, 'Status': 3, 'Text': '交易提醒', 'OriContent': '', 'MediaId': '', 'StatusNotifyCode': 0, 'ForwardFlag': 0}
2017-01-22 01:10:07,168: plugins.eh_wechat_slave.incomeMsgMeta [DEBUG]
    me, False
2017-01-22 01:10:07,348: plugins.eh_wechat_slave.incomeMsgMeta [DEBUG]
    From user, {'NickName': '华夏银行', 'VerifyFlag': 24, 'RemarkPYQuanPin': '', 'Alias': 'hxwxgzzh', 'HeadImgUrl': '/cgi-bin/mmwebwx-bin/webwxgeticon?seq=***&username=@***&skey=@***', 'IsOwner': 0, 'MemberList': [], 'UniFriend': 0, 'Statues': 0, 'Uin': 0, 'Sex': 0, 'KeyWord': 'gh_', 'MemberCount': 0, 'RemarkName': '', 'AppAccountFlag': 0, 'OwnerUin': 0, 'DisplayName': '', 'Province': '北京', 'ContactFlag': ***, 'ChatRoomId': 0, 'PYInitial': 'HXYX', 'AttrStatus': 0, 'EncryChatRoomId': '', 'PYQuanPin': 'huaxiayinxing', 'SnsFlag': 0, 'City': '东城', 'RemarkPYInitial': '', 'StarFriend': 0, 'UserName': '@***', 'HideInputBarFlag': 0, 'Signature': '华夏银行'}
2017-01-22 01:10:07,557: plugins.eh_wechat_slave.incomeMsgMeta [DEBUG]
    dest: {'name': '***', 'uid': '***', 'alias': '***'}
2017-01-22 01:10:07,566: plugins.eh_wechat_slave.incomeMsgMeta [INFO]
    WeChat incoming message:
Type: Link
Text: 交易提醒
UserName: @***
uid: ***
name: 华夏银行
2017-01-22 01:10:07,566: plugins.eh_wechat_slave.WeChatChannel [DEBUG]
    WeChat "System" message:
{'Type': 'System', 'ToUserName': '@***', 'FromUserName': '@***', 'Text': ['@@***'], 'SystemInfo': 'chatrooms'}
2017-01-22 01:10:07,567: plugins.eh_telegram_master.TelegramChannel [INFO]
    Got message from queue
Type: Link
Text:
----
2017-01-22 01:10:07,574: plugins.eh_telegram_master.TelegramChannel [DEBUG]
    1485018607.574313, Msg text:
2017-01-22 01:10:07,574: plugins.eh_telegram_master.TelegramChannel [DEBUG]
    1485018607.574313, process_msg_step_0
2017-01-22 01:10:07,574: peewee [DEBUG]
    ('SELECT "t1"."id", "t1"."master_uid", "t1"."slave_uid" FROM "chatassoc" AS t1 WHERE ("t1"."slave_uid" = ?)', ['eh_wechat_slave.***'])
2017-01-22 01:10:07,575: peewee [DEBUG]
    ('SELECT "t1"."id", "t1"."master_uid", "t1"."slave_uid" FROM "chatassoc" AS t1 WHERE ("t1"."master_uid" = ?)', ['eh_telegram_master.-***'])
2017-01-22 01:10:07,575: plugins.eh_telegram_master.TelegramChannel [DEBUG]
    1485018607.574313, process_msg_step_1, tg_dest=***, msg.origin={'name': '华夏银行', 'uid': '***', 'alias': '华夏银行'}
2017-01-22 01:10:07,575: plugins.eh_telegram_master.TelegramChannel [DEBUG]
    1485018607.574313, process_msg_step_2
2017-01-22 01:10:07,575: plugins.eh_telegram_master.TelegramChannel [INFO]
    Msg sent to TG, task_done marked.
2017-01-22 01:10:07,582: plugins.eh_telegram_master.TelegramChannel [ERROR]
    TypeError('quote_from_bytes() expected bytes',)Traceback (most recent call last):
  File "/home/xf/repo/ehForwarderBot/plugins/eh_telegram_master/__init__.py", line 294, in process_msg
    text = "🔗 <a href=\"%s\">%s</a>\n%s" % (urllib.parse.quote(msg.attributes["url"], safe="?=&#:/"),
  File "/home/xf/.pyenv/versions/3.5.2/lib/python3.5/urllib/parse.py", line 712, in quote
    return quote_from_bytes(string, safe)
  File "/home/xf/.pyenv/versions/3.5.2/lib/python3.5/urllib/parse.py", line 737, in quote_from_bytes
    raise TypeError("quote_from_bytes() expected bytes")
TypeError: quote_from_bytes() expected bytes

python telegram bot

hello.

import telegram
bot = telegram.Bot(token='token')

I am getting following Error:
AttributeError: 'module' object has no attribute 'Bot'

and

dir(Telegram)

['class', 'delattr', 'dict', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'gt', 'hash', 'init', 'init_subclass', 'le', 'lt', 'module', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'setattr', 'sizeof', 'str', 'subclasshook', 'weakref']

telegram.ext.updater [ERROR]

2017-05-14 08:49:29,501: telegram.ext.updater [ERROR]
    Error while getting Updates: Timed out
2017-05-14 08:49:29,507: plugins.eh_telegram_master.TelegramChannel [ERROR]
    Poor internet connection detected.
Error count: 14
\Timed out
Update: None
2017-05-14 08:51:25,742: telegram.ext.updater [ERROR]
    Error while getting Updates: Timed out
2017-05-14 08:51:25,748: plugins.eh_telegram_master.TelegramChannel [ERROR]
    Poor internet connection detected.
Error count: 15
\Timed out
Update: None
2017-05-14 08:52:07,186: telegram.ext.updater [ERROR]
    Error while getting Updates: Timed out
2017-05-14 08:52:07,195: plugins.eh_telegram_master.TelegramChannel [ERROR]
    Poor internet connection detected.
Error count: 16
\Timed out
Update: None

How to fix it?

希望能增加转发IRC频道功能

本来想用这个wechat-telegram-irc-qq的,然而telegram bot之间无法接收消息
希望可以加一个把微信群消息发到指定IRC频道里的功能

提个小小的建议

比如我有一些工作的群,然后我单独把这些群link到一个group里面,日常非工作时段,把这个group开启免打扰,工作时再打开提醒。但是因为群聊中日常会有人过生日。微信群聊的名称就改了,就要一次次重新link,请问有没有什么解决的办法,谢谢。

Input “python3 main.py” ,Keep prompting "Please immediately turn off this EFB instances. Another bot instance or webhook detected."

python3 daemon.py status

PID: 5810, CMD: '/usr/bin/python3 main.py'
Logfile: 'EFB.log'
Name: xxxxxxxxxx(May be involved in privacy, so hidden)
Start at: "2017-06-28 06:06:56"

python3 main.py

2017-07-03 01:55:47,488: ehForwarderBot [CRITICAL]
Initializing slave ('plugins.eh_wechat_slave', 'WeChatChannel')...
2017-07-03 01:55:52,546: ehForwarderBot [CRITICAL]
Slave channel WeChat Slave (eh_wechat_slave) initialized.
2017-07-03 01:55:52,548: ehForwarderBot [CRITICAL]
Initializing master ('plugins.eh_telegram_master', 'TelegramChannel')...
2017-07-03 01:55:54,451: ehForwarderBot [CRITICAL]
Master channel Telegram Master (eh_telegram_master) initialized.
2017-07-03 01:55:54,453: ehForwarderBot [CRITICAL]
All channels initialized. (Here when the telegram has been able to send and receive messages
2017-07-03 01:55:55,902: telegram.ext.updater [ERROR]
Error while getting Updates: Conflict: terminated by other long poll or webhook (409)
2017-07-03 01:55:55,905: plugins.eh_telegram_master.TelegramChannel [CRITICAL]
Please immediately turn off this EFB instances.
Another bot instance or webhook detected.
2017-07-03 01:55:58,708: telegram.ext.updater [ERROR]
Error while getting Updates: Conflict: terminated by other long poll or webhook (409)
2017-07-03 01:55:58,709: plugins.eh_telegram_master.TelegramChannel [CRITICAL]
Please immediately turn off this EFB instances.
Another bot instance or webhook detected.
^C(In this time when the telegram can not receive the messages

Attach this, hope he is useful

cat EFB.log

2017-07-03 01:35:09,996: telegram.ext.updater [ERROR]
Error while getting Updates: Conflict: terminated by other long poll or webhook (409)
2017-07-03 01:35:09,997: plugins.eh_telegram_master.TelegramChannel [CRITICAL]
Please immediately turn off this EFB instances.
Another bot instance or webhook detected.

EWS some app sharing type message can not receive

2017-02-11 18:49:52,749: plugins.eh_wechat_slave.wechat_msg_meta [DEBUG]
    Raw message: {'Type': 'Sharing', 'RecommendInfo': {'QQNum': 0, 'Sex': 0, 'Ticket': '', 'NickName': '', 'Alias': '', 'OpCode': 0, 'AttrStatus': 0, 'City': '', 'Signature': '', 'VerifyFlag': 0, 'UserName': '', 'Scene': 0, 'Content': '', 'Province': ''}, 'FileName': '缸鸭狗(湖滨店)', 'ImgStatus': 2, 'ForwardFlag': 0, 'SubMsgType': 0, 'NewMsgId': 6549964xxxxxxx, 'FileSize': '', 'AppMsgType': 5, 'MsgType': 49, 'AppInfo': {'Type': 0, 'AppID': 'wx8e251222d6836a60'}, 'FromUserName': '@4d953d2be6d3xxxxx', 'ToUserName': '@099639dbd1xxxxxx', 'StatusNotifyCode': 0, 'Content': '<?xml version="1.0"?>\n<msg>\n\t<appmsg appid="wx8e251222d6836a60" sdkver="0">\n\t\t<title>缸鸭狗(湖滨店)</title>\n\t\t<des>★★★★\n¥54/人\n湖滨 小吃快餐\n延安路255号龙翔里二弄104室</des>\n\t\t<username />\n\t\t<action>view</action>\n\t\t<type>5</type>\n\t\t<showtype>0</showtype>\n\t\t<content />\n\t\t<url>http://m.dianping.com/appshare/shop/21640420</url>\n\t\t<lowurl />\n\t\t<dataurl />\n\t\t<lowdataurl />\n\t\t<contentattr>0</contentattr>\n\t\t<streamvideo>\n\t\t\t<streamvideourl />\n\t\t\t<streamvideototaltime>0</streamvideototaltime>\n\t\t\t<streamvideotitle />\n\t\t\t<streamvideowording />\n\t\t\t<streamvideoweburl />\n\t\t\t<streamvideothumburl />\n\t\t\t<streamvideoaduxinfo />\n\t\t\t<streamvideopublishid />\n\t\t</streamvideo>\n\t\t<canvasPageItem>\n\t\t\t<canvasPageXml><![CDATA[]]></canvasPageXml>\n\t\t</canvasPageItem>\n\t\t<appattach>\n\t\t\t<attachid />\n\t\t\t<cdnthumburl>305a0201000453305102010002048356c25402033d11ff020450c9c0b70204589dbda6042f6175706170706d73675f613336373164613763306364653435305f313438363733323731303730325f3131383731380201000201000400</cdnthumburl>\n\t\t\t<cdnthumbmd5>a83469379d593f39adb6af79eb0e299d</cdnthumbmd5>\n\t\t\t<cdnthumblength>15483</cdnthumblength>\n\t\t\t<cdnthumbheight>110</cdnthumbheight>\n\t\t\t<cdnthumbwidth>110</cdnthumbwidth>\n\t\t\t<cdnthumbaeskey>30fd124e6182401f92571ccfac103767</cdnthumbaeskey>\n\t\t\t<aeskey>30fd124e6182401f92571ccfac103767</aeskey>\n\t\t\t<encryver>1</encryver>\n\t\t\t<fileext />\n\t\t\t<islargefilemsg>0</islargefilemsg>\n\t\t</appattach>\n\t\t<extinfo />\n\t\t<androidsource>2</androidsource>\n\t\t<thumburl />\n\t\t<mediatagname />\n\t\t<messageaction><![CDATA[]]></messageaction>\n\t\t<messageext><![CDATA[]]></messageext>\n\t\t<emoticongift>\n\t\t\t<packageflag>0</packageflag>\n\t\t\t<packageid />\n\t\t</emoticongift>\n\t\t<emoticonshared>\n\t\t\t<packageflag>0</packageflag>\n\t\t\t<packageid />\n\t\t</emoticonshared>\n\t\t<weappinfo>\n\t\t\t<pagepath><![CDATA[null]]></pagepath>\n\t\t\t<username />\n\t\t\t<appid />\n\t\t</weappinfo>\n\t\t<designershared>\n\t\t\t<designeruin>0</designeruin>\n\t\t\t<designername>null</designername>\n\t\t\t<designerrediretcturl>null</designerrediretcturl>\n\t\t</designershared>\n\t\t<emotionpageshared>\n\t\t\t<tid>0</tid>\n\t\t\t<title>null</title>\n\t\t\t<desc>null</desc>\n\t\t\t<iconUrl>null</iconUrl>\n\t\t\t<secondUrl>null</secondUrl>\n\t\t\t<pageType>0</pageType>\n\t\t</emotionpageshared>\n\t\t<webviewshared>\n\t\t\t<shareUrlOriginal />\n\t\t\t<shareUrlOpen />\n\t\t\t<jsAppId />\n\t\t\t<publisherId />\n\t\t</webviewshared>\n\t\t<template_id>0</template_id>\n\t\t<statextstr>GhQKEnd4OGUyNTEyMjJkNjgzNmE2MA==</statextstr>\n\t\t<md5 />\n\t\t<md5>a83469379d593f39adb6af79eb0e299d</md5>\n\t</appmsg>\n\t<fromusername>cy509529</fromusername>\n\t<scene>0</scene>\n\t<appinfo>\n\t\t<version>70</version>\n\t\t<appname>大众点评</appname>\n\t</appinfo>\n\t<commenturl></commenturl>\n</msg>\n', 'CreateTime': 1486810190, 'VoiceLength': 0, 'Url': 'http://m.dianping.com/appshare/shop/21640420', 'MsgId': '65499643xxxx', 'OriContent': '', 'Ticket': '', 'Status': 3, 'Text': '缸鸭狗(湖滨店)', 'MediaId': '', 'ImgHeight': 0, 'ImgWidth': 0, 'StatusNotifyUserName': '', 'HasProductId': 0, 'PlayLength': 0}
2017-02-11 18:59:23,217: plugins.eh_wechat_slave.wechat_msg_meta [DEBUG]
    Raw message: {'FileSize': '', 'StatusNotifyUserName': '', 'MsgId': '33030566xxxx', 'MediaId': '', 'OriContent': '', 'StatusNotifyCode': 0, 'FromUserName': '@099639dbd1xxxxxx', 'ImgWidth': 0, 'Url': 'http://m.dianping.com/appshare/shop/21640420', 'VoiceLength': 0, 'PlayLength': 0, 'AppInfo': {'Type': 0, 'AppID': 'wx8e251222d6836a60'}, 'FileName': '缸鸭狗(湖滨店)', 'ToUserName': 'filehelper', 'HasProductId': 0, 'AppMsgType': 5, 'Type': 'Sharing', 'SubMsgType': 0, 'CreateTime': 1486810762, 'ImgStatus': 2, 'Content': '<?xml version="1.0"?>\n<msg>\n\t<appmsg appid="wx8e251222d6836a60" sdkver="0">\n\t\t<title>缸鸭狗(湖滨店)</title>\n\t\t<des>★★★★\n¥54/人\n湖滨 小吃快餐\n延安路255号龙翔里二弄104室</des>\n\t\t<username />\n\t\t<action>view</action>\n\t\t<type>5</type>\n\t\t<showtype>0</showtype>\n\t\t<content />\n\t\t<url>http://m.dianping.com/appshare/shop/21640420</url>\n\t\t<lowurl />\n\t\t<dataurl />\n\t\t<lowdataurl />\n\t\t<contentattr>0</contentattr>\n\t\t<streamvideo>\n\t\t\t<streamvideourl />\n\t\t\t<streamvideototaltime>0</streamvideototaltime>\n\t\t\t<streamvideotitle />\n\t\t\t<streamvideowording />\n\t\t\t<streamvideoweburl />\n\t\t\t<streamvideothumburl />\n\t\t\t<streamvideoaduxinfo />\n\t\t\t<streamvideopublishid />\n\t\t</streamvideo>\n\t\t<canvasPageItem>\n\t\t\t<canvasPageXml><![CDATA[]]></canvasPageXml>\n\t\t</canvasPageItem>\n\t\t<appattach>\n\t\t\t<attachid />\n\t\t\t<cdnthumburl>305a0201000453305102010002048356c25402033d11ff020450c9c0b70204589dc1e2042f6175706170706d73675f393237623035356462656438303665665f313438363733333739343332325f3131383736380201000201000400</cdnthumburl>\n\t\t\t<cdnthumbmd5>74f7ab7f59a22b5be6115100b2a97deb</cdnthumbmd5>\n\t\t\t<cdnthumblength>28648</cdnthumblength>\n\t\t\t<cdnthumbheight>120</cdnthumbheight>\n\t\t\t<cdnthumbwidth>120</cdnthumbwidth>\n\t\t\t<cdnthumbaeskey>13dff4f17ab448599c76d21c5c6330e2</cdnthumbaeskey>\n\t\t\t<aeskey>13dff4f17ab448599c76d21c5c6330e2</aeskey>\n\t\t\t<encryver>1</encryver>\n\t\t\t<fileext />\n\t\t\t<islargefilemsg>0</islargefilemsg>\n\t\t</appattach>\n\t\t<extinfo />\n\t\t<androidsource>3</androidsource>\n\t\t<thumburl />\n\t\t<mediatagname />\n\t\t<messageaction><![CDATA[]]></messageaction>\n\t\t<messageext><![CDATA[]]></messageext>\n\t\t<emoticongift>\n\t\t\t<packageflag>0</packageflag>\n\t\t\t<packageid />\n\t\t</emoticongift>\n\t\t<emoticonshared>\n\t\t\t<packageflag>0</packageflag>\n\t\t\t<packageid />\n\t\t</emoticonshared>\n\t\t<weappinfo>\n\t\t\t<pagepath><![CDATA[null]]></pagepath>\n\t\t\t<username />\n\t\t\t<appid />\n\t\t</weappinfo>\n\t\t<designershared>\n\t\t\t<designeruin>0</designeruin>\n\t\t\t<designername>null</designername>\n\t\t\t<designerrediretcturl>null</designerrediretcturl>\n\t\t</designershared>\n\t\t<emotionpageshared>\n\t\t\t<tid>0</tid>\n\t\t\t<title>null</title>\n\t\t\t<desc>null</desc>\n\t\t\t<iconUrl>null</iconUrl>\n\t\t\t<secondUrl>null</secondUrl>\n\t\t\t<pageType>0</pageType>\n\t\t</emotionpageshared>\n\t\t<webviewshared>\n\t\t\t<shareUrlOriginal />\n\t\t\t<shareUrlOpen />\n\t\t\t<jsAppId />\n\t\t\t<publisherId />\n\t\t</webviewshared>\n\t\t<template_id>0</template_id>\n\t\t<statextstr>GhQKEnd4OGUyNTEyMjJkNjgzNmE2MA==</statextstr>\n\t\t<md5 />\n\t\t<md5>74f7ab7f59a22b5be6115100b2a97deb</md5>\n\t</appmsg>\n\t<fromusername>xufan6</fromusername>\n\t<scene>0</scene>\n\t<appinfo>\n\t\t<version>70</version>\n\t\t<appname>大众点评</appname>\n\t</appinfo>\n\t<commenturl></commenturl>\n</msg>\n', 'ForwardFlag': 0, 'RecommendInfo': {'UserName': '', 'City': '', 'Alias': '', 'VerifyFlag': 0, 'Content': '', 'Province': '', 'Sex': 0, 'Scene': 0, 'Signature': '', 'NickName': '', 'AttrStatus': 0, 'Ticket': '', 'QQNum': 0, 'OpCode': 0}, 'NewMsgId': 33030566xxxxxxx, 'Text': '缸鸭狗(湖滨店)', 'Status': 3, 'ImgHeight': 0, 'Ticket': '', 'MsgType': 49}

ETM TypeError: quote_from_bytes() expected bytes

2017-02-21 12:32:09,916: plugins.eh_wechat_slave.wechat_msg_meta [DEBUG]
    Raw message: {'CreateTime': 1487651528, 'PlayLength': 0, 'ImgWidth': 0, 'StatusNotifyUserName': '', 'AppMsgType': 5, 'FromUserName': '@2083930dd3c5xxx', 'ImgStatus': 1, 'AppInfo': {'Type': 0, 'AppID': ''}, 'Type': 'Sharing', 'StatusNotifyCode': 0, 'VoiceLength': 0, 'ForwardFlag': 0, 'ImgHeight': 0, 'Ticket': '', 'FileSize': '0', 'MediaId': '', 'Content': '<msg> <appmsg appid="" sdkver="0"> \t<title><![CDATA[交易提醒]]></title> \t<des><![CDATA[\r\n尊敬的客户:\r\n您的华夏卡*xxx最近交易信息\n\n\n交易时间:21日12时31分\n交易类型:人行跨行收款\n交易金额:收款 人民币 43.84元\n\r\n您的华夏卡余额为人民币2,816.92元。如有疑问,请立即致电95577。]]></des> \t<action></action> \t<type>5</type> \t<showtype>1</showtype>     <soundtype>0</soundtype> \t<content><![CDATA[]]></content> \t<contentattr>0</contentattr> \t<url><![CDATA[]]></url> \t<lowurl><![CDATA[]]></lowurl> \t<appattach> \t\t<totallen>0</totallen> \t\t<attachid></attachid> \t\t<fileext></fileext> \t</appattach> \t<extinfo></extinfo> \t<mmreader> \t\t<category type="0" count="1"> \t\t\t<name><![CDATA[华夏银行]]></name> \t\t\t<topnew> \t\t\t\t<cover><![CDATA[]]></cover> \t\t\t\t<width>0</width> \t\t\t\t<height>0</height> \t\t\t\t<digest><![CDATA[\r\n尊敬的客户:\r\n您的华夏卡*xxx最近交易信息\n\n\n交易时间:21日12时31分\n交易类型:人行跨行收款\n交易金额:收款 人民币 43.84元\n\r\n您的华夏卡余额为人民币2,816.92元。如有疑问,请立即致电95577。]]></digest> \t\t\t</topnew> \t\t\t\t<item> \t<itemshowtype>4</itemshowtype> \t<title><![CDATA[交易提醒]]></title> \t<url><![CDATA[]]></url> \t<shorturl><![CDATA[]]></shorturl> \t<longurl><![CDATA[]]></longurl> \t<pub_time>1487651528</pub_time> \t<cover><![CDATA[]]></cover> \t<tweetid></tweetid> \t<digest><![CDATA[\r\n尊敬的客户:\r\n您的华夏卡*xxx最近交易信息\n\n\n交易时间:21日12时31分\n交易类型:人行跨行收款\n交易金额:收款 人民币 43.84元\n\r\n您的华夏卡余额为人民币2,816.92元。如有疑问,请立即致电95577。]]></digest> \t<fileid>0</fileid> \t<sources> \t<source> \t<name><![CDATA[华夏银行]]></name> \t</source> \t</sources> \t<styles><topColor><![CDATA[#FFFFFF]]></topColor>\n<style>\n<range><![CDATA[{0,26}]]></range>\n<font><![CDATA[s]]></font>\n<color><![CDATA[#000000]]></color>\n</style>\n<style>\n<range><![CDATA[{34,9}]]></range>\n<font><![CDATA[s]]></font>\n<color><![CDATA[#000000]]></color>\n</style>\n<style>\n<range><![CDATA[{49,6}]]></range>\n<font><![CDATA[s]]></font>\n<color><![CDATA[#000000]]></color>\n</style>\n<style>\n<range><![CDATA[{61,13}]]></range>\n<font><![CDATA[s]]></font>\n<color><![CDATA[#0000FF]]></color>\n</style>\n<style>\n<range><![CDATA[{75,39}]]></range>\n<font><![CDATA[s]]></font>\n<color><![CDATA[#000000]]></color>\n</style>\n</styles>\t<native_url></native_url>    <del_flag>0</del_flag>     <contentattr>0</contentattr>     <play_length>0</play_length> \t<play_url></play_url> \t<player><![CDATA[]]></player> \t</item> \t\t</category> \t\t<publisher> \t\t\t<username><![CDATA[hxwxgzzh]]></username> \t\t\t<nickname><![CDATA[华夏银行]]></nickname> \t\t</publisher> \t\t<template_header></template_header> \t\t<template_detail></template_detail> \t    <forbid_forward>0</forbid_forward> \t</mmreader> \t<thumburl><![CDATA[]]></thumburl> \t     <template_id><![CDATA[fkf7nyz4DPQFxxx_g]]></template_id>                     </appmsg><fromusername><![CDATA[gh_4e3aexxx]]></fromusername><appinfo><version>0</version><appname><![CDATA[华夏银行]]></appname><isforceupdate>1</isforceupdate></appinfo></msg>', 'SubMsgType': 0, 'Url': '', 'RecommendInfo': {'Province': '', 'NickName': '', 'Content': '', 'Ticket': '', 'Signature': '', 'Alias': '', 'VerifyFlag': 0, 'Sex': 0, 'QQNum': 0, 'UserName': '', 'OpCode': 0, 'Scene': 0, 'AttrStatus': 0, 'City': ''}, 'Text': '交易提醒', 'Status': 3, 'MsgType': 49, 'HasProductId': 0, 'FileName': '交易提醒', 'OriContent': '', 'NewMsgId': 883399138xxx, 'ToUserName': '@099639dbd19fabcxxx', 'MsgId': '883399138xxx'}
2017-02-21 12:32:09,917: plugins.eh_wechat_slave.wechat_msg_meta [DEBUG]
    Raw message: {'CreateTime': 1487651528, 'PlayLength': 0, 'ImgWidth': 0, 'StatusNotifyUserName': '', 'AppMsgType': 5, 'FromUserName': '@2083930dd3c5xxx', 'ImgStatus': 1, 'AppInfo': {'Type': 0, 'AppID': ''}, 'Type': 'Sharing', 'StatusNotifyCode': 0, 'VoiceLength': 0, 'ForwardFlag': 0, 'ImgHeight': 0, 'Ticket': '', 'FileSize': '0', 'MediaId': '', 'Content': '<msg> <appmsg appid="" sdkver="0"> \t<title><![CDATA[交易提醒]]></title> \t<des><![CDATA[\r\n尊敬的客户:\r\n您的华夏卡*xxx最近交易信息\n\n\n交易时间:21日12时31分\n交易类型:人行跨行收款\n交易金额:收款 人民币 43.84元\n\r\n您的华夏卡余额为人民币2,816.92元。如有疑问,请立即致电95577。]]></des> \t<action></action> \t<type>5</type> \t<showtype>1</showtype>     <soundtype>0</soundtype> \t<content><![CDATA[]]></content> \t<contentattr>0</contentattr> \t<url><![CDATA[]]></url> \t<lowurl><![CDATA[]]></lowurl> \t<appattach> \t\t<totallen>0</totallen> \t\t<attachid></attachid> \t\t<fileext></fileext> \t</appattach> \t<extinfo></extinfo> \t<mmreader> \t\t<category type="0" count="1"> \t\t\t<name><![CDATA[华夏银行]]></name> \t\t\t<topnew> \t\t\t\t<cover><![CDATA[]]></cover> \t\t\t\t<width>0</width> \t\t\t\t<height>0</height> \t\t\t\t<digest><![CDATA[\r\n尊敬的客户:\r\n您的华夏卡*xxx最近交易信息\n\n\n交易时间:21日12时31分\n交易类型:人行跨行收款\n交易金额:收款 人民币 43.84元\n\r\n您的华夏卡余额为人民币2,816.92元。如有疑问,请立即致电95577。]]></digest> \t\t\t</topnew> \t\t\t\t<item> \t<itemshowtype>4</itemshowtype> \t<title><![CDATA[交易提醒]]></title> \t<url><![CDATA[]]></url> \t<shorturl><![CDATA[]]></shorturl> \t<longurl><![CDATA[]]></longurl> \t<pub_time>1487651528</pub_time> \t<cover><![CDATA[]]></cover> \t<tweetid></tweetid> \t<digest><![CDATA[\r\n尊敬的客户:\r\n您的华夏卡*xxx最近交易信息\n\n\n交易时间:21日12时31分\n交易类型:人行跨行收款\n交易金额:收款 人民币 43.84元\n\r\n您的华夏卡余额为人民币2,816.92元。如有疑问,请立即致电95577。]]></digest> \t<fileid>0</fileid> \t<sources> \t<source> \t<name><![CDATA[华夏银行]]></name> \t</source> \t</sources> \t<styles><topColor><![CDATA[#FFFFFF]]></topColor>\n<style>\n<range><![CDATA[{0,26}]]></range>\n<font><![CDATA[s]]></font>\n<color><![CDATA[#000000]]></color>\n</style>\n<style>\n<range><![CDATA[{34,9}]]></range>\n<font><![CDATA[s]]></font>\n<color><![CDATA[#000000]]></color>\n</style>\n<style>\n<range><![CDATA[{49,6}]]></range>\n<font><![CDATA[s]]></font>\n<color><![CDATA[#000000]]></color>\n</style>\n<style>\n<range><![CDATA[{61,13}]]></range>\n<font><![CDATA[s]]></font>\n<color><![CDATA[#0000FF]]></color>\n</style>\n<style>\n<range><![CDATA[{75,39}]]></range>\n<font><![CDATA[s]]></font>\n<color><![CDATA[#000000]]></color>\n</style>\n</styles>\t<native_url></native_url>    <del_flag>0</del_flag>     <contentattr>0</contentattr>     <play_length>0</play_length> \t<play_url></play_url> \t<player><![CDATA[]]></player> \t</item> \t\t</category> \t\t<publisher> \t\t\t<username><![CDATA[hxwxgzzh]]></username> \t\t\t<nickname><![CDATA[华夏银行]]></nickname> \t\t</publisher> \t\t<template_header></template_header> \t\t<template_detail></template_detail> \t    <forbid_forward>0</forbid_forward> \t</mmreader> \t<thumburl><![CDATA[]]></thumburl> \t     <template_id><![CDATA[fkf7nyz4DPQFxxx_g]]></template_id>                     </appmsg><fromusername><![CDATA[gh_4e3aexxx]]></fromusername><appinfo><version>0</version><appname><![CDATA[华夏银行]]></appname><isforceupdate>1</isforceupdate></appinfo></msg>', 'SubMsgType': 0, 'Url': '', 'RecommendInfo': {'Province': '', 'NickName': '', 'Content': '', 'Ticket': '', 'Signature': '', 'Alias': '', 'VerifyFlag': 0, 'Sex': 0, 'QQNum': 0, 'UserName': '', 'OpCode': 0, 'Scene': 0, 'AttrStatus': 0, 'City': ''}, 'Text': '交易提醒', 'Status': 3, 'MsgType': 49, 'HasProductId': 0, 'FileName': '交易提醒', 'OriContent': '', 'NewMsgId': 883399138xxx, 'ToUserName': '@099639dbd19fabcxxx', 'MsgId': '883399138xxx'}
2017-02-21 12:32:09,917: plugins.eh_wechat_slave.wechat_msg_meta [DEBUG]
    me, False
2017-02-21 12:32:10,021: plugins.eh_wechat_slave.wechat_msg_meta [DEBUG]
    From user, {'Province': '北京', 'HideInputBarFlag': 0, 'StarFriend': 0, 'HeadImgUrl': '/cgi-bin/mmwebwx-bin/webwxgeticon?seq=653066722&username=@2083930dd3c5xxx&skey=@crypt_2fa3b0c2_45d54fxxx', 'PYInitial': 'HXYX', 'ChatRoomId': 0, 'UserName': '@2083930dd3c5xxx', 'Alias': 'hxwxgzzh', 'UniFriend': 0, 'Uin': 'gh_4e3aexxx', 'IsOwner': 0, 'AppAccountFlag': 0, 'SnsFlag': 0, 'NickName': '华夏银行', 'City': '东城', 'Sex': 0, 'MemberCount': 0, 'RemarkPYQuanPin': '', 'EncryChatRoomId': '', 'RemarkName': '', 'ContactFlag': 2051, 'VerifyFlag': 24, 'RemarkPYInitial': '', 'KeyWord': 'gh_', 'AttrStatus': 0, 'Signature': '华夏银行', 'PYQuanPin': 'huaxiayinxing', 'MemberList': [], 'Statues': 0, 'OwnerUin': 0, 'DisplayName': ''}
2017-02-21 12:32:10,116: plugins.eh_wechat_slave.wechat_msg_meta [DEBUG]
    dest: {'uid': '69049xxx', 'alias': 'xufan6', 'name': 'xufan6'}
2017-02-21 12:32:10,117: plugins.eh_wechat_slave.wechat_msg_meta [INFO]
    WeChat incoming message:
Type: Link
Text: 交易提醒
UserName: @2083930dd3c5xxx
uid: xxx
name: 华夏银行
2017-02-21 12:32:10,117: plugins.eh_telegram_master.TelegramChannel [INFO]
    Got message from queue
Type: Link
Text:
----
2017-02-21 12:32:10,117: plugins.eh_telegram_master.TelegramChannel [DEBUG]
    1487651530.117628, Msg text:
2017-02-21 12:32:10,117: plugins.eh_telegram_master.TelegramChannel [INFO]
    Msg sent to TG, task_done marked.
2017-02-21 12:32:10,117: plugins.eh_telegram_master.TelegramChannel [DEBUG]
    1487651530.117628, process_msg_step_0
2017-02-21 12:32:10,118: peewee [DEBUG]
    ('SELECT "t1"."id", "t1"."master_uid", "t1"."slave_uid" FROM "chatassoc" AS t1 WHERE ("t1"."slave_uid" = ?)', ['eh_wechat_slave.xxx'])
2017-02-21 12:32:10,118: peewee [DEBUG]
    ('SELECT "t1"."id", "t1"."master_uid", "t1"."slave_uid" FROM "chatassoc" AS t1 WHERE ("t1"."master_uid" = ?)', ['eh_telegram_master.-1813xxx'])
2017-02-21 12:32:10,119: plugins.eh_telegram_master.TelegramChannel [DEBUG]
    1487651530.117628, process_msg_step_1, tg_dest=xxx, msg.origin={'uid': 'xxx', 'alias': '华夏银行', 'name': '华夏银行'}
2017-02-21 12:32:10,119: plugins.eh_telegram_master.TelegramChannel [DEBUG]
    1487651530.117628, process_msg_step_2
2017-02-21 12:32:10,120: plugins.eh_telegram_master.TelegramChannel [ERROR]
    TypeError('quote_from_bytes() expected bytes',)Traceback (most recent call last):
  File "/home/xf/repo/ehForwarderBot/plugins/eh_telegram_master/__init__.py", line 304, in process_msg
    urllib.parse.quote(msg.attributes["url"], safe="?=&#:/"),
  File "/home/xf/.pyenv/versions/3.5.2/lib/python3.5/urllib/parse.py", line 712, in quote
    return quote_from_bytes(string, safe)
  File "/home/xf/.pyenv/versions/3.5.2/lib/python3.5/urllib/parse.py", line 737, in quote_from_bytes
    raise TypeError("quote_from_bytes() expected bytes")
TypeError: quote_from_bytes() expected bytes

被禁止登录网页版微信

今天下午尝试发送消息时提示 Chat is not reachable from the slave channel.

退出bot,然后尝试在网页上登录,得到这样的提示:
Your login may be compromised. For account security, you cannot log in to Web WeChat. You can try mobile WeChat or Windows WeChat.

PC版的微信可以正常登录。

类似的项目也有人在近期遇到了相同的情况。
littlecodersh/ItChat#402

有人反馈会在几天后自动恢复。

个人推测是登录失败次数过多或连续登录时间过长,使帐号保护启动。

如何指定某个微信群禁止转发到 Telegram?

由于学校实习需要,强制使用微信,因此在几周前我在网上找到这个项目并使用它来将微信群的消息转发到 Telegram。

但是使用久了我发现一个问题:它不能指定某个微信群禁止转发,我只能将机器人拉到某个群里,指定该机器人能够转发哪个微信群或联系人地消息。

这个问题让我造成了很大的困扰,比如毫无必要的公众号推送,还有一些亲戚群里经常出现的不适合公众场合访问的擦边球内容,甚至是可能会被认为是 child p0rn 的儿童果体照(比如小孩子洗澡的照片)都会直接通过机器人推送到我的 Telegram 里。

tim 20170630221126

因为这个问题我刚才紧急停止了机器人的工作。

我现在想询问下,现在有什么方法能够选择某个微信群组或联系人禁止转发到 Telegram?如果没有,何时能够将这个功能完善好?

无法接收图片和语音消息(可以发送)

我手动开了debug之后的输出是
语音消息:

2017-03-18 18:56:49,272: plugins.eh_wechat_slave.wechat_msg_meta [DEBUG]
    Raw message: {'Content': '<msg><voicemsg endflag="1" cancelflag="0" forwardflag="0" voiceformat="4" voicelength="2281" length="4181" bufid="*****" clientmsgid="*****" fromusername="*****" /></msg>', 'MsgId': '*****', 'CreateTime': 1489863408, 'ImgWidth': 0, 'RecommendInfo': {'VerifyFlag': 0, 'Content': '', 'UserName': '', 'City': '', 'Signature': '', 'NickName': '', 'Sex': 0, 'Alias': '', 'Scene': 0, 'Ticket': '', 'Province': '', 'AttrStatus': 0, 'QQNum': 0, 'OpCode': 0}, 'OriContent': '', 'Type': 'Recording', 'StatusNotifyCode': 0, 'StatusNotifyUserName': '', 'FileSize': '', 'MediaId': '', 'Text': <function get_download_fn.<locals>.download_fn at 0x7f525019b158>, 'VoiceLength': 2281, 'FileName': '*****-*****.mp3', 'ImgHeight': 0, 'NewMsgId': *****, 'Status': 3, 'ForwardFlag': 0, 'AppMsgType': 0, 'Url': '', 'FromUserName': '@*****', 'PlayLength': 0, 'ToUserName': 'filehelper', 'HasProductId': 0, 'ImgStatus': 1, 'SubMsgType': 0, 'Ticket': '', 'MsgType': 34, 'AppInfo': {'AppID': '', 'Type': 0}}
2017-03-18 18:56:49,369: itchat [WARNING]
    Traceback (most recent call last):
  File "/home/*****/.local/lib/python3.5/site-packages/itchat/components/register.py", line 66, in configured_reply
    r = replyFn(msg)
  File "/home/*****/ehForwarderBot/plugins/eh_wechat_slave.py", line 29, in wrap_func
    mobj = func(self, msg, *args, **kwargs)
  File "/home/*****/ehForwarderBot/plugins/eh_wechat_slave.py", line 516, in wechat_voice_msg
    mobj.path, mobj.mime = self.save_file(msg, mobj.type)
  File "/home/*****/ehForwarderBot/plugins/eh_wechat_slave.py", line 594, in save_file
    msg['Text'](fullpath)
  File "/home/*****/.local/lib/python3.5/site-packages/itchat/components/messages.py", line 42, in download_fn
    'PostFix': utils.get_image_postfix(tempStorage.read(20)), })
  File "/home/*****/.local/lib/python3.5/site-packages/itchat/utils.py", line 137, in get_image_postfix
    if 'GIF' in data:
TypeError: a bytes-like object is required, not 'str'

图片消息:

2017-03-18 18:55:59,914: plugins.eh_wechat_slave.wechat_msg_meta [DEBUG]
    Raw message: {'Content': '<?xml version="1.0"?>\n<msg>\n\t<img aeskey="*****" encryver="0" cdnthumbaeskey="*****" cdnthumburl="*****" cdnthumblength="6534" cdnthumbheight="120" cdnthumbwidth="68" cdnmidheight="0" cdnmidwidth="0" cdnhdheight="0" cdnhdwidth="0" cdnmidimgurl="*****" length="41313" md5="*****" />\n</msg>\n', 'MsgId': '*****', 'CreateTime': 1489863359, 'ImgWidth': 68, 'RecommendInfo': {'VerifyFlag': 0, 'Content': '', 'UserName': '', 'City': '', 'Signature': '', 'NickName': '', 'Sex': 0, 'Alias': '', 'Scene': 0, 'Ticket': '', 'Province': '', 'AttrStatus': 0, 'QQNum': 0, 'OpCode': 0}, 'OriContent': '', 'Type': 'Picture', 'StatusNotifyCode': 0, 'StatusNotifyUserName': '', 'FileSize': '', 'MediaId': '', 'Text': <function get_download_fn.<locals>.download_fn at 0x7f5250187950>, 'VoiceLength': 0, 'FileName': '*****.png', 'ImgHeight': 120, 'NewMsgId': *****, 'Status': 3, 'ForwardFlag': 0, 'AppMsgType': 0, 'Url': '', 'FromUserName': '@*****', 'PlayLength': 0, 'ToUserName': 'filehelper', 'HasProductId': 0, 'ImgStatus': 2, 'SubMsgType': 0, 'Ticket': '', 'MsgType': 3, 'AppInfo': {'AppID': '', 'Type': 0}}
2017-03-18 18:56:00,766: itchat [WARNING]
    Traceback (most recent call last):
  File "/home/*****/.local/lib/python3.5/site-packages/itchat/components/register.py", line 66, in configured_reply
    r = replyFn(msg)
  File "/home/*****/ehForwarderBot/plugins/eh_wechat_slave.py", line 29, in wrap_func
    mobj = func(self, msg, *args, **kwargs)
  File "/home/*****/ehForwarderBot/plugins/eh_wechat_slave.py", line 496, in wechat_picture_msg
    mobj.path, mime = self.save_file(msg, mobj.type)
  File "/home/*****/ehForwarderBot/plugins/eh_wechat_slave.py", line 594, in save_file
    msg['Text'](fullpath)
  File "/home/*****/.local/lib/python3.5/site-packages/itchat/components/messages.py", line 42, in download_fn
    'PostFix': utils.get_image_postfix(tempStorage.read(20)), })
  File "/home/*****/.local/lib/python3.5/site-packages/itchat/utils.py", line 137, in get_image_postfix
    if 'GIF' in data:
TypeError: a bytes-like object is required, not 'str'

另外发送语音消息对面收到的是个****.unknown文件,这是设计如此还是Bug?

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.