早上发的翼支付30-20 python 脚本被删了重新发一遍 别私信我了

爱必应

网友scp-173分享:
"timestamp" 和"requestDate" 改为要抢场次的开场时间 如"2021-1-28 10:00:00"

start_time 是脚本开始运行的时间

默认循环500次 0.1s一次

开着抓包软件进入30-20 券的那个会场
会出现   https://mapi.bestpay.com.cn/mapi … asStationCouponList 这条数据

抓出来的数据填到cookies里面
其中 "couponNo":这条在 响应的预览里面
其他的cookies数据 在 请求的预览 里面

  1. import requests
  2. from datetime import datetime
  3. import time
  4. # from bs4 import BeautifulSoup
  5. url = "https://mapi.bestpay.com.cn/mapi/redbag/lifeGasStation/drawCoupon"
  6. start_time = "2021-1-28 09:59:55"
  7. sleeptime = 0.9
  8. timeArray = datetime.strptime(start_time, "%Y-%m-%d %H:%M:%S")
  9. def time_server():
  10.     #获得京东服务器时间
  11.     #r1 = requests.get(‘https://a.jd.com//ajax/queryServerData.html’).json()[‘serverTime’]
  12.     # 获取本地服务器的时间戳
  13.     r1 = time.time()*1000#获当前时间的时间戳
  14.     # 把时间戳格式/1000 获取毫秒
  15.     timeNum = int(r1) / 1000
  16.     # 格式化时间 (小数点后6为)
  17.     time1 = datetime.fromtimestamp(timeNum)
  18.     return time1
  19. headers = {
  20.     "Host": "mapi.bestpay.com.cn",
  21.     "Connection": "keep-alive",
  22.     "Content-Length": "606",
  23.     "Accept": "application/json, text/plain, */*",
  24.     "Origin": "https://h5.bestpay.cn",
  25.     "User-Agent": "Mozilla/5.0 (Linux; Android 9; Redmi K20 Pro Premium Edition Build/PKQ1.190616.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.136 Mobile Safari/537.36 Bestpay/10.1.61 hybridVersion/3.0",
  26.     "Content-Type": "application/json;charset=UTF-8",
  27.     "Referer": "https://h5.bestpay.cn/subapps/bestpaymall-client-h5/january/main.html?isOutIn=true&hybridVersion=3.0&pageFrom=weijinwei",
  28.     "Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7",
  29.     "X-Requested-With": "com.chinatelecom.bestpayclient"
  30. }
  31. cookies = {
  32.     "loginChannel": "App",
  33.     "couponNo":
  34.     "token":
  35.     "keep":
  36.     "agreeId":
  37.     "timestamp":
  38.     "requestDate":
  39.     "fromchannelId":
  40.     "method":
  41.     "productNo":
  42.     "channel":
  43.     "loginNo":
  44.     "tradeChannel":
  45.     "traceLogId":
  46.     "sessionKey":
  47.     "appType":"",
  48.     "sign":
  49.     "getEncInfo":
  50. }
  51. #session = requests.post(url=url, headers=headers, json=cookies)
  52. #print(session.text)
  53. def refresh():
  54.     seconds = (time_server() – datetime.now()).microseconds
  55.     timedifference = 2-(seconds/1000000)
  56.     while True:
  57.     # 判断时间服务器时间是否大于或等于开始的时间
  58.         if datetime.now() >=timeArray:
  59.             time.sleep(timedifference-sleeptime)
  60.             session = requests.post(url=url, headers=headers, json=cookies)
  61.             print(session.text)
  62.             print(time_server())
  63.             #print(datetime.now())
  64.             print("任务开始")
  65.             for i in range(500):
  66.                 time.sleep(0.1)
  67.                 session = requests.post(url=url, headers=headers, json=cookies)
  68.                 print(session.text)
  69.             print(time_server())
  70.             #print(datetime.now())
  71.             print("任务完成")
  72.             break
  73. refresh()
  74. print("————-ok————-")

复制代码

网友mj1234分享:
mk

网友htomza分享:
mk

网友yjss135分享:
1

网友wenfuyu分享:
mark

网友wwang_ll分享:
技术贴必须果

网友xukesky11分享:
在手机还是电脑抓包

网友xiaoye1398分享:
完全看不懂

网友xb340分享:
mk

网友zzk951分享:
1

网友XYLZ786分享:
mk

网友gubin686222分享:
mk

推荐:
翼支付 30-20 python 脚本

网友scp-173分享: st…

京东百亿补贴直接领取券链接

网友半寸灰分享: 快14点了 …

建行到底怎么玩有果果

网友wuyufeng8885分…

原文链接:,转发请注明来源!

发表评论