|
本帖最后由 dforel 于 2020-2-21 13:31 编辑
分享一下领取的办法,麻烦置顶,抄隔壁大佬的,@K丶ing,@ctos 以及@blowsnow 等等 大佬的分享精神
[ol]#!/usr/bin/env python# -*- coding: utf-8 -*-import requestsimport jsonurl = 'https://biz.caiyunapp.com/v1/excode/send'idlist=[4748,5192,5566,5817,6390,7023,7385,8864,9332,9389,9434,9675,9974]for i in idlist: body = { "link_id": str(i), "phone_num": "*",#手机号 "app_name": "xiaoyi" } headers = {"Accept": "application/json, text/plain, */*","Accept-Encoding": "gzip, deflate, br","Accept-Language": "zh-cn","Connection": "keep-alive","Content-Length": "62","Content-Type": "application/json;charset=UTF-8","Host": "biz.caiyunapp.com","Origin": "https://caiyunapp.com","Referer": "https://caiyunapp.com/invited/conversion.html?id="+str(i),"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36",} #print url; #print body; #print headers; response = requests.post(url, data = json.dumps(body), headers = headers) data = response.text print(i) data1 = json.loads(data)['rc'] data1 = int(data1) if data1 > -1: id = body['link_id'] print(id)[/ol]复制代码 |
|