From ec84662035412aa18ce662cebe68f3f4ee731cc9 Mon Sep 17 00:00:00 2001 From: pandolia Date: Wed, 15 Feb 2017 18:44:48 +0800 Subject: [PATCH] =?UTF-8?q?2.0.6=E7=89=88=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 10 +++++----- qqbot/qconf.py | 2 +- qqbot/qsession.py | 3 +++ setup.py | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 08a22a0..19b51d9 100644 --- a/README.md +++ b/README.md @@ -248,19 +248,19 @@ GUI 模式是默认的模式,只适用于个人电脑。邮箱模式可以适 配置文件中的所有选项都有对应的命令行参数,在命令行参数中输入的选项优先级比配置文件高。输入 qqbot -h 可查看所有命令行参数格式。 -如果配置的 QQBot-term 服务器端口号不是默认的 8188 ,那么在运行 qterm 或 qtm 命令时,需要在第一个参数中指定端口号,如: +如果配置的 QQBot-term 服务器端口号不是默认的 8188 ,那么在运行 qterm 或 qq 命令时,需要在第一个参数中指定端口号,如: $ qterm 8100 - $ qtm 8100 send buddy jack hello - $ qtm 8100 member group chatbot + $ qq 8100 send buddy jack hello + $ qq 8100 member group chatbot 七、参考资料 ------------- QQBot 参考了以下开源项目: -- [ScienJus/qqbot](https://github.com/ScienJus/qqbot) (ruby) -- [floatinghotpot/qqbot](https://github.com/floatinghotpot/qqbot) (node.js) +- [ScienJus/qqbot](https://github.com/ScienJus/qqbot) (ruby) +- [floatinghotpot/qqbot](https://github.com/floatinghotpot/qqbot) (node.js) - [sjdy521/Mojo-Webqq](https://github.com/sjdy521/Mojo-Webqq) (perl) 在此感谢以上三位作者的无私分享,特别是感谢 ScienJus 对 SmartQQ 协议所做出的深入细致的分析。 diff --git a/qqbot/qconf.py b/qqbot/qconf.py index 6edb2a6..11300f5 100644 --- a/qqbot/qconf.py +++ b/qqbot/qconf.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -version = 'v2.0.5' +version = 'v2.0.6' sampleConfStr = '''{ diff --git a/qqbot/qsession.py b/qqbot/qsession.py index 89b84a5..59c7ac8 100644 --- a/qqbot/qsession.py +++ b/qqbot/qsession.py @@ -69,6 +69,7 @@ def prepareSession(self): self.clientid = 53999199 self.msgId = 6000000 self.session = requests.Session() + # self.session.verify self.session.headers.update({ 'User-Agent': ('Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9;' ' rv:27.0) Gecko/20100101 Firefox/27.0'), @@ -479,6 +480,8 @@ def urlGet(self, url, data=None, **kw): ERROR('无法和腾讯服务器建立私密连接,' ' 10 秒后将尝试使用非私密连接和腾讯服务器通讯。' '若您不希望使用非私密连接,请按 Ctrl+C 退出本程序。') + time.sleep(10) + WARN('已开始尝试使用非私密连接和腾讯服务器通讯。') requests.packages.urllib3.disable_warnings( requests.packages.urllib3.exceptions. InsecureRequestWarning diff --git a/setup.py b/setup.py index 61c2b5e..8a52fa7 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup -version = '2.0.5' +version = '2.0.6' setup( name = 'qqbot',