Update zgfc.py

pull/22/head
wd210010 9 months ago committed by GitHub
parent 4f618b7ace
commit d6ee7c42ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 28
      zgfc.py

@ -6,7 +6,7 @@
# ------------------------------- # -------------------------------
# cron "0 0 8 * * *" script-path=xxx.py,tag=匹配cron用 # cron "0 0 8 * * *" script-path=xxx.py,tag=匹配cron用
# const $ = new Env('福彩抽奖') # const $ = new Env('福彩抽奖')
import requests,json,os import requests,json,os,time
#活动路径 中国福彩公众号 右下角新年活动 #活动路径 中国福彩公众号 右下角新年活动
#手机号登录后 抓取https://ssqcx-serv.cwlo.com.cn域名下的请求头的Authorization 放入青龙变量或者放入config.sh 变量名为zgfcau 放在config.sh的话 多账号用&分割 放在青龙变量就多建几个变量 #手机号登录后 抓取https://ssqcx-serv.cwlo.com.cn域名下的请求头的Authorization 放入青龙变量或者放入config.sh 变量名为zgfcau 放在config.sh的话 多账号用&分割 放在青龙变量就多建几个变量
@ -45,18 +45,20 @@ for i in range(len(zgfcaulist)):
print('该Authorization可能无效!') print('该Authorization可能无效!')
print('**开始抽奖**') print('**开始抽奖**')
try: try:
resp2 = requests.post('https://ssqcx-serv.cwlo.com.cn/api/lottery/start', headers=headers) for i in range(3):
result2 = json.loads(resp2.text) resp2 = requests.post('https://ssqcx-serv.cwlo.com.cn/api/lottery/start', headers=headers)
# print(result2) result2 = json.loads(resp2.text)
success = result2['msg'] # print(result2)
if success =='成功' and len(result2['data']['lottery_sn'])>0: success = result2['msg']
massage = f'账号{i+1}中奖了!请自行查看' if success =='成功' and len(result2['data']['lottery_sn'])>0:
print(massage) massage = f'账号{i+1}中奖了!请自行查看'
Push(contents=massage) print(massage)
elif success =='成功' and len(result2['data']['lottery_sn'])==0: Push(contents=massage)
print('未中奖') elif success =='成功' and len(result2['data']['lottery_sn'])==0:
else: print('未中奖')
print(success) else:
print(success)
time.sleep(3)
except: except:
print('该Authorization可能无效!') print('该Authorization可能无效!')
print(wishidlist) print(wishidlist)

Loading…
Cancel
Save