From bb494ec71f033c0b2ddbfb1b4e4883b304b809a9 Mon Sep 17 00:00:00 2001 From: liushuchun Date: Tue, 25 Oct 2016 18:26:50 +0800 Subject: [PATCH] Fix the sync host bug --- weixin.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/weixin.py b/weixin.py index dbab45c..b891db8 100755 --- a/weixin.py +++ b/weixin.py @@ -338,10 +338,9 @@ class WebWeixin(object): 'webpush.wechat.com', 'webpush1.wechat.com', 'webpush2.wechat.com', - 'webpush1.wechatapp.com', - 'webpush.wechatapp.com', 'webpush.wx.qq.com', - 'webpush.wx2.qq.com', + 'webpush2.wx.qq.com' + # 'webpush.wechatapp.com' ] for host in SyncHost: self.syncHost = host @@ -1077,7 +1076,7 @@ class WebWeixin(object): request = urllib2.Request(url=url, data=urllib.urlencode(params)) - try: + try: response = urllib2.urlopen(request) data = response.read() if jsonfmt: