Last active
March 25, 2019 04:02
-
-
Save RoyXiang/100696e8d021ef43d2b56a456a9ef2e5 to your computer and use it in GitHub Desktop.
Revisions
-
RoyXiang revised this gist
Feb 13, 2017 . 1 changed file with 1 addition and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,19 +9,10 @@ 即 Telegram 上会收到掉线提醒,且可以直接在 Telegram 上进行重新登录的操作 * bot 通信不畅最终引起的微信网页版掉线 此时发送 `/start` 命令给 bot 不会响应,通常是由于服务器与 Telegram 服务器通信不畅导致,使用 [webhook](https://github.com/blueset/ehForwarderBot/wiki/ETM:-Use-web-hook) 方式启动 bot 可以一定程度上规避这个问题。 * 微信网页版掉线(Telegram 上无通知) 此时发送 `/start` 命令给 bot 会正常回复内容,这种情况的原因目前尚且不明。发生这种情况的话,必须手动登录服务器重新启动 EFB。(希望在重启之前可以执行下面的脚本并把输出内容反馈到 itchat 的 [issue#229](https://github.com/littlecodersh/ItChat/issues/229)) -
RoyXiang revised this gist
Feb 13, 2017 . 1 changed file with 12 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ #!/usr/bin/env python3 import itchat import logging from itchat.components.login import sync_check instance = itchat.new_instance() instance.load_login_status('storage/eh_wechat_slave.pkl') logging.basicConfig(level=logging.DEBUG) sync_check(instance) -
RoyXiang revised this gist
Feb 13, 2017 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,10 +6,15 @@ ## 掉线常见情况: * 正常掉线(已达到微信网页版的最长挂机时长) 即 Telegram 上会收到掉线提醒,且可以直接在 Telegram 上进行重新登录的操作 * bot 掉线 此时发送 `/start` 命令给 bot 不会响应,通常是由于服务器与 Telegram 服务器通信不畅导致,使用 [webhook](https://github.com/blueset/ehForwarderBot/wiki/ETM:-Use-web-hook) 方式启动 bot 可以一定程度上规避这个问题。 * 微信网页版掉线(Telegram 上无通知) 此时发送 `/start` 命令给 bot 会正常回复内容,这种情况的原因目前尚且不明。发生这种情况的话,必须手动登录服务器重新启动 EFB。(希望在重启之前可以执行下面的脚本并把输出内容反馈到 itchat 的 [issue#229](https://github.com/littlecodersh/ItChat/issues/229)) ``` Python import itchat -
RoyXiang created this gist
Feb 13, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ ## 须知: 1. EFB 微信端使用的是 [itchat](https://github.com/littlecodersh/ItChat) 这个第三方库,所有的行为目前与[微信网页版](https://wx.qq.com/)一致。 2. 若需长期维持在线,需保持微信移动端在线,卸载或者彻底关闭后台将会导致掉线。 ## 掉线常见情况: * 正常掉线(已达到微信网页版的最长挂机时长) 即 Telegram 上会收到掉线提醒,且可以直接在 Telegram 上进行重新登录的操作 * bot 掉线 此时发送 `/start` 命令给 bot 不会响应,通常是由于服务器与 Telegram 服务器通信不畅导致,使用 [webhook](https://github.com/blueset/ehForwarderBot/wiki/ETM:-Use-web-hook) 方式启动 bot 可以一定程度上规避这个问题。 * 微信网页版掉线(Telegram 上无通知) 此时发送 `/start` 命令给 bot 会正常回复内容,这种情况的原因目前尚且不明。发生这种情况的话,必须手动登录服务器重新启动 EFB。(希望在重启之前可以执行下面的脚本并把输出内容反馈到 itchat 的 [issue#229](https://github.com/littlecodersh/ItChat/issues/229)) ``` Python import itchat import logging itchat.load_login_status('storage/eh_wechat_slave.pkl') logging.basicConfig(level=logging.DEBUG) itchat.sync_check() ```