Skip to content

Commit

Permalink
chore(push): Fix QYWX push fail
Browse files Browse the repository at this point in the history
  • Loading branch information
a76yyyy committed Jul 18, 2023
1 parent 1a4f896 commit 9c89f16
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions libs/funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,11 @@ async def qywx_pusher_send(self, qywx_token, title:str, log:str):

if qywx[u'代理'][-1]!='/':
qywx[u'代理'] = qywx[u'代理'] + '/'
if 'http://' in qywx[u'代理'] or 'https://' in qywx[u'代理']:
qywx[u'代理'] = u'https://{0}'.format(qywx[u'代理'])
if qywx[u'代理'][:4] != 'http':
if qywx[u'代理'] == 'qyapi.weixin.qq.com/':
qywx[u'代理'] = u'https://{0}'.format(qywx[u'代理'])
else:
qywx[u'代理'] = u'http://{0}'.format(qywx[u'代理'])
get_access_token_res = await self.get_access_token(qywx)
pic_url = config.push_pic if qywx[u'图片'] == '' else qywx[u'图片']
if (get_access_token_res.get('access_token','') != '' and get_access_token_res['errmsg'] == 'ok'):
Expand Down

0 comments on commit 9c89f16

Please sign in to comment.