From 06c2fd8053d3bdcc6ea4f94fa2dcde2cf5e4570a Mon Sep 17 00:00:00 2001 From: sbilly Date: Mon, 22 Feb 2016 09:12:24 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=BA=E7=9C=81=E5=85=B3=E9=97=AD=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=9B=9E=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes to be committed: modified: weixin.py --- weixin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/weixin.py b/weixin.py index 79b032b..a8781c4 100755 --- a/weixin.py +++ b/weixin.py @@ -82,6 +82,7 @@ class WebWeixin(object): self.autoReplyMode = False self.syncHost = '' self.user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.109 Safari/537.36' + self.interactive = False opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookielib.CookieJar())) opener.addheaders = [('User-agent', self.user_agent)] @@ -520,7 +521,7 @@ class WebWeixin(object): if self.DEBUG: print self logging.debug(self) - if raw_input('[*] 是否开启自动回复模式(y/n): ') == 'y': + if self.interactive and raw_input('[*] 是否开启自动回复模式(y/n): ') == 'y': self.autoReplyMode = True print '[*] 自动回复模式 ... 开启' logging.debug('[*] 自动回复模式 ... 开启')