Explore Enterprise Education Gitee Premium Gitee AI AI teammates
Fetch the repository succeeded.
Donate
Please sign in before you donate.
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
1 Star 0 Fork 0

孙勇军/sign_script

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
Already have an account? Sign in
文件
master
Branches (1)
master
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
The license selected for the repository is subject to the license used by the main branch of the repository.
master
Branches (1)
master
Clone or Download
Clone/Download
Prompt
To download the code, please copy the following command and execute it in the terminal
To ensure that your submitted code identity is correctly recognized by Gitee, please execute the following command.
When using the SSH protocol for the first time to clone or push code, follow the prompts below to complete the SSH configuration.
1 Generate RSA keys.
2 Obtain the content of the RSA public key and configure it in SSH Public Keys
To use SVN on Gitee, please visit the usage guide
When using the HTTPS protocol, the command line will prompt for account and password verification as follows. For security reasons, Gitee recommends configure and use personal access tokens instead of login passwords for cloning, pushing, and other operations.
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # Private Token
master
Branches (1)
master
sign_script
/
tebu.py
sign_script
/
tebu.py
tebu.py 5.58 KB
Copy Edit Raw Blame History
sunyj authored 2024年04月28日 10:56 +08:00 . 提交
# !/bin/env python3
# -*- coding: utf-8 -*
"""
感谢 一峰一燕 提供脚本以及技术支持
项目名称: 特步 小程序
Author: yml
Date: 2022年7月8日
cron: 19 7 * * * tebu.py
new Env("特步");
================== 青龙--配置文件 ==================
变量格式: export tebu_data=" ezr-vuid & ezr-st & ezr-ss & ezr-userid " ,多账号用 换行 或 @ 分割
【教程】: 需要自行用手机抓取 wxa-tp.ezrpro.com 域名的包 , ezr-vuid , ezr-st , ezr-ss , ezr-userid 是 headers 中的参数
"""
# ================================= 以下代码不懂不要随便乱动 ====================================
try:
import requests
import json
import sys
import os
import re
import time
except Exception as e:
print(e)
requests.packages.urllib3.disable_warnings()
# --------------------------------------------------------------------------------------------
Script_Name = "特步"
Name_Pinyin = "tebu"
Script_Change = "特步商城签到 ,第一个 py 脚本"
Script_Version = "0.1.2"
Version_Check = "0.1.2"
# --------------------------------------------------------------------------------------------
def last_version(name, mold):
url = ''
if mold == 1:
url = "https://raw.gh.fakev.cn/yml2213/Python/master/" + name + "/" + name + ".py"
elif mold == 2:
url = "http://yml-gitea.ml:2233/yml/JavaScript-yml/raw/branch/master/" + name + ".py"
try:
_url = url
_headers = {}
response = requests.get(url=_url, headers=_headers, verify=False)
result = response.text
r = re.compile(r'Version_Check = "(.*?)"')
_data = r.findall(result)
if not _data:
return "出现未知错误 ,请稍后重试!"
else:
return _data[0]
except Exception as err:
print(err)
def mac_env(name):
global ckArr
pwd = os.path.dirname(os.path.abspath(__file__)) + os.sep
path = pwd + ".env"
with open(path, "r+") as f:
env = f.read()
if name in env:
r = re.compile(r'tebu_data="(.*?)"', re.M | re.S | re.I)
result = r.findall(env)
# print(data[0])
if "@" in result[0]:
_ck = result[0].split("@")
ckArr = _ck
elif "\n" in result[0]:
_ck = result[0].split("\n")
ckArr = _ck
else:
ckArr = result
else:
print("检查变量" + name + "是否已填写")
def ql_env(name):
global ckArr
if name in os.environ:
ckArr = []
_data = os.environ[name]
if "@" in _data:
_ck = _data.split("@")
ckArr = _ck
elif "\n" in _data:
_ck = _data.split("\n")
ckArr = _ck
else:
ckArr = _data.split("@")
# mac_env("tebu_data")
ql_env("tebu_data")
class Script:
def __init__(self, vuid, st, ss, userid):
self.vuid = vuid
self.st = st
self.ss = ss
self.userid = userid
def sign_info(self):
print("开始 签到信息")
url_signinfo = "https://wxa-tp.ezrpro.com/myvip/Vip/SignIn/GetSignInDtlInfo"
url_signin = "https://wxa-tp.ezrpro.com/myvip/Vip/SignIn/SignIn"
payload = json.dumps({
"ActId": 784,
"ActRemindStatus": True
})
headers = {
'Host': 'wxa-tp.ezrpro.com',
'ezr-cop-id': '143',
'ezr-vuid': self.vuid,
'ezr-source': 'weapp',
'ezr-st': self.st,
'ezr-ss': self.ss,
'ezr-userid': self.userid,
'ezr-sv': '1',
'ezr-brand-id': '254',
'content-type': 'application/json'
}
try:
response = requests.get(url=url_signinfo, headers=headers, verify=False)
result = response.json()
if result["Result"]["VipSignInDtl"]["IsSigInToday"]:
print("签到: 您今天已经签到了 ,明天再来吧!")
return
elif not result["Result"]["VipSignInDtl"]["IsSigInToday"]:
print("签到: 您今天未签到 ,去签到喽!")
else:
print("签到: 获取签到信息失败 ,请检查 变量 是否正确!")
except Exception as err:
print(err)
try:
response = requests.post(url=url_signin, headers=headers, data=payload, verify=False)
result = response.json()
# print(result)
if result["Success"]:
print("签到:" + result["Msg"]+" ,获得积分: " + result["Result"]["BonusValue"] + " 个!")
return
else:
print("签到: 获取签到信息失败 ,请检查 变量 是否正确!")
except Exception as err:
print(err)
def tip():
global ckArr
print("================ 脚本只支持青龙新版 =================")
print("============ 具体教程以请自行查看顶部教程 =============\n")
print("🔔 " + Script_Name + " ,开始!")
origin_version = last_version(Name_Pinyin, 1)
print("📌 本地脚本: V " + Script_Version +
" 远程仓库版本: V " + origin_version)
print("📌 🆙 更新内容: " + Script_Change)
print("共发现 " + str(len(ckArr)) + " 个账号!")
if __name__ == "__main__":
global msg_info
global ckArr
tip()
for inx, data in enumerate(ckArr):
print("=============== 开始第" + str(inx + 1) + "个账号 ===============")
ck = data.split("&")
tebu = Script(ck[0], ck[1], ck[2], ck[3])
tebu.sign_info()
Loading...
Report
Report success
We will send you the feedback within 2 working days through the letter!
Please fill in the reason for the report carefully. Provide as detailed a description as possible.
Please select a report type
Cancel
Send
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

Releases

No release

Contributors

All

Language(Optional)

Activities

can not load any more
Edit
About
Homepage
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/syjava/sign_script.git
git@gitee.com:syjava/sign_script.git
syjava
sign_script
sign_script
master
Going to Help Center

Search

Comment
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register

AltStyle によって変換されたページ (->オリジナル) /