微博超话签到★百度贴吧签到★小米运动刷步数★恩山签到★雨云签到白嫖服务器★小茅预约★丽宝乐园小程序签到★天翼云盘签到★腾讯视频签到(会员领成长值)★阿里云盘签到★GW树洞机场签到★富贵论坛签到★一点万向签到打卡★什么值得买达人和关键词取消关注★STLXZ签到★PT站签到★帆软签到+摇摇乐★千图网签到★星空代理签到★什么值得买签到★值得买每日抽奖★小米社区签到★逑美在线app签到和抽卡★ddnsto自动续费七天★爱奇艺签到刷时长★双色球预测(娱乐)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
2.6 KiB

#!/usr/bin/python3
# -- coding: utf-8 --
# -------------------------------
# @Author : github@wd210010 https://github.com/wd210010/just_for_happy
# @Time : 2023/2/27 13:23
# -------------------------------
# cron "30 7 * * *" script-path=xxx.py,tag=匹配cron用
# const $ = new Env('星空代理签到')
import requests, json
import os
# 青龙变量 xk_username xk_password
xk_username= os.getenv("xk_username").split('&')
xk_password = os.getenv("xk_password").split('&')
for i in range(len(xk_username)):
print(f'开始第{i + 1}个帐号签到')
url = 'http://www.xkdaili.com/tools/submit_ajax.ashx?action=user_login&site_id=1'
headers = {
'Accept': 'application/json, text/javascript, */*; q=0.01',
'Accept-Encoding': 'gzip, deflate',
'Accept-Language': 'zh-CN,zh;q=0.9',
'Content-Length': '50',
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'Host': 'www.xkdaili.com',
'Origin': 'http://www.xkdaili.com',
'Proxy-Connection': 'keep-alive',
'Referer': 'http://www.xkdaili.com/',
'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36',
'X-Requested-With': 'XMLHttpRequest',
}
data = {
'username': f'{xk_username[i]}',
'password': f'{xk_password[i]}',
'remember': 1
}
response = requests.post(url=url, headers=headers, data=data,verify=False)
cookie=str(requests.utils.dict_from_cookiejar(response.cookies)).replace(',',';').replace(':','=').replace('\'','').replace('{','').replace('}','').replace(' ','')
r = json.loads(response.text)['msg']
print(r)
url_sign = 'http://www.xkdaili.com/tools/submit_ajax.ashx?action=user_receive_point'
headers_sign = {
'Accept': 'application/json, text/javascript, */*; q=0.01',
'Accept-Encoding': 'gzip, deflate',
'Accept-Language': 'zh-CN,zh;q=0.9',
'Content-Length': '10',
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'Cookie': cookie,
'Host': 'www.xkdaili.com',
'Origin': 'http://www.xkdaili.com',
'Proxy-Connection': 'keep-alive',
'Referer': 'http://www.xkdaili.com/main/usercenter.aspx',
'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36',
'X-Requested-With': 'XMLHttpRequest',
}
data_sign = {
'type': 'login'
}
html_sign = requests.post(url=url_sign, headers=headers_sign, data=data_sign)
result = json.loads(html_sign.text)['msg']
print(result)