Skip to content

Commit 5172afe

Browse files
author
liuwangsheng01
committed
change sync url
1 parent d358ce0 commit 5172afe

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ def handle_msg_all(self, msg):
1010
self.send_msg_by_uid(u'hi', msg['user']['id'])
1111
self.send_img_msg_by_uid("img/1.png", msg['user']['id'])
1212
self.send_file_msg_by_uid("img/1.png", msg['user']['id'])
13-
'''
13+
1414
def schedule(self):
1515
self.send_msg(u'测试群', u'测试')
16-
'''
16+
self.send_img_msg_by_uid("img/1.png", self.get_user_id(u"测试群"))
17+
self.send_file_msg_by_uid("img/1.png", self.get_user_id(u"测试群"))
18+
time.sleep(5)
1719

1820

1921
def main():

wxbot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,7 +1227,7 @@ def status_notify(self):
12271227
return dic['BaseResponse']['Ret'] == 0
12281228

12291229
def test_sync_check(self):
1230-
for host in ['webpush', 'webpush2']:
1230+
for host in ['webpush.wx', 'webpush2.wx', 'webpush.weixin', 'webpush2.weixin2', ]:
12311231
self.sync_host = host
12321232
retcode = self.sync_check()[0]
12331233
if retcode == '0':
@@ -1244,7 +1244,7 @@ def sync_check(self):
12441244
'synckey': self.sync_key_str,
12451245
'_': int(time.time()),
12461246
}
1247-
url = 'https://' + self.sync_host + '.wx.qq.com/cgi-bin/mmwebwx-bin/synccheck?' + urllib.urlencode(params)
1247+
url = 'https://' + self.sync_host + '.qq.com/cgi-bin/mmwebwx-bin/synccheck?' + urllib.urlencode(params)
12481248
try:
12491249
r = self.session.get(url, timeout=60)
12501250
r.encoding = 'utf-8'

0 commit comments

Comments
 (0)