马上不是要到黑五了吗,最近部分商家已经开始了预热的活动,手工难抢到,CloudCone的脚本和其它的不一样,大家可以试下脚本,好像是去年就有了,来源于不知道名的大佬,希望小伙伴都能抢到自己满意的机器
token获取:
抢购成功:
下面是脚本:
#!/usr/bin/python
# coding=utf-8
import time
import random
import requests
import json
def run():
while True:
url = 'https://app.cloudcone.com/blackfriday/offers' # cc链接
url2 = "https://app.cloudcone.com/ajax/vps" # 返回结果链接
try:
req_header = {
"Host": "app.cloudcone.com",
"Sec-Fetch-Dest": "empty",
"Sec-Fetch-Mode": "cors",
"Sec-Fetch-Site": "same-origin",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36",
"X-Requested-With": "XMLHttpRequest",
"Cookie": "tihuan"
}
response = requests.get(url, req_header)
html1 = str(response.content, "utf-8")
jsondata = json.loads(html1)['__data']['vps_data']
for num in jsondata:
if jsondata[num]['usd_price'] < 12: # 小于多少刀
payload = {'os': '1007',
'hostname': 'baidu.com',
'location': '2',
'plan': num,
'method': 'provision',
'_token': 'tihuan',
}
response = requests.post(
url2, headers=req_header, data=payload, timeout=3)
if response.status_code == 200:
print(response.text)
except Exception as e:
print(e.__str__())
continue
#time.sleep(2.5*random.randint(2, 10))
if __name__ == '__main__':
run()
使用中注意一下,如果少依赖就 pip install一下。
首先登录,登录后将获取的cookie值复制到python中替换 “tihuan” 里边的内容,然后直接 python this.py运行就可以了。
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END