mirror of
https://github.com/liuwons/wxBot.git
synced 2026-10-16 20:50:39 +08:00
change sync url
This commit is contained in:
@@ -10,10 +10,12 @@ class MyWXBot(WXBot):
|
||||
self.send_msg_by_uid(u'hi', msg['user']['id'])
|
||||
self.send_img_msg_by_uid("img/1.png", msg['user']['id'])
|
||||
self.send_file_msg_by_uid("img/1.png", msg['user']['id'])
|
||||
'''
|
||||
|
||||
def schedule(self):
|
||||
self.send_msg(u'测试群', u'测试')
|
||||
'''
|
||||
self.send_img_msg_by_uid("img/1.png", self.get_user_id(u"测试群"))
|
||||
self.send_file_msg_by_uid("img/1.png", self.get_user_id(u"测试群"))
|
||||
time.sleep(5)
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
@@ -1227,7 +1227,7 @@ class WXBot:
|
||||
return dic['BaseResponse']['Ret'] == 0
|
||||
|
||||
def test_sync_check(self):
|
||||
for host in ['webpush', 'webpush2']:
|
||||
for host in ['webpush.wx', 'webpush2.wx', 'webpush.weixin', 'webpush2.weixin2', ]:
|
||||
self.sync_host = host
|
||||
retcode = self.sync_check()[0]
|
||||
if retcode == '0':
|
||||
@@ -1244,7 +1244,7 @@ class WXBot:
|
||||
'synckey': self.sync_key_str,
|
||||
'_': int(time.time()),
|
||||
}
|
||||
url = 'https://' + self.sync_host + '.wx.qq.com/cgi-bin/mmwebwx-bin/synccheck?' + urllib.urlencode(params)
|
||||
url = 'https://' + self.sync_host + '.qq.com/cgi-bin/mmwebwx-bin/synccheck?' + urllib.urlencode(params)
|
||||
try:
|
||||
r = self.session.get(url, timeout=60)
|
||||
r.encoding = 'utf-8'
|
||||
|
||||
Reference in New Issue
Block a user