text stringlengths 1 93.6k |
|---|
exit(3)
|
from urllib.parse import unquote
|
try:
|
from jd_cookie import getJDCookie
|
getCk = getJDCookie()
|
except:
|
print("请先下载依赖脚本,\n下载链接:https://ghproxy.com/https://raw.githubusercontent.com/curtinlv/JD-Script/main/jd_tool_dl.py")
|
sys.exit(3)
|
# requests.packages.urllib3.disable_warnings()
|
pwd = os.path.dirname(os.path.abspath(__file__)) + os.sep
|
uuid = ''.join(random.sample('123456789abcdef123456789abcdef123456789abcdef123456789abcdef', 40))
|
addressid = ''.join(random.sample('1234567898647', 10))
|
iosVer = ''.join(random.sample(["14.5.1", "14.4", "14.3", "14.2", "14.1", "14.0.1", "13.7", "13.1.2", "13.1.1"], 1))
|
iosV = iosVer.replace('.', '_')
|
iPhone = ''.join(random.sample(["8", "9", "10", "11", "12", "13"], 1))
|
ADID = ''.join(random.sample('0987654321ABCDEF', 8)) + '-' + ''.join(
|
random.sample('0987654321ABCDEF', 4)) + '-' + ''.join(random.sample('0987654321ABCDEF', 4)) + '-' + ''.join(
|
random.sample('0987654321ABCDEF', 4)) + '-' + ''.join(random.sample('0987654321ABCDEF', 12))
|
###
|
if "ccfxj_isOrder" in os.environ:
|
if len(os.environ["ccfxj_isOrder"]) > 1:
|
ccfxj_isOrder = os.environ["ccfxj_isOrder"]
|
if "isNotice" in os.environ:
|
if len(os.environ["isNotice"]) > 1:
|
isNotice = os.environ["isNotice"]
|
if "ccfxj_help" in os.environ:
|
if len(os.environ["ccfxj_help"]) > 1:
|
ccfxj_help = os.environ["ccfxj_help"]
|
if '&' in ccfxj_help:
|
ccfxj_help = ccfxj_help.split('&')
|
print("已获取并使用Env环境 ccfxj_help:", ccfxj_help)
|
if not isinstance(ccfxj_help, list):
|
ccfxj_help = ccfxj_help.split(" ")
|
def userAgent():
|
"""
|
随机生成一个UA
|
jdapp;iPhone;10.0.4;14.2;9fb54498b32e17dfc5717744b5eaecda8366223c;network/wifi;ADID/2CF597D0-10D8-4DF8-C5A2-61FD79AC8035;model/iPhone11,1;addressid/7785283669;appBuild/167707;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/null;supportJDSHWK/1
|
:return: ua
|
"""
|
if not UserAgent:
|
return f'jdapp;iPhone;10.0.4;{iosVer};{uuid};network/wifi;ADID/{ADID};model/iPhone{iPhone},1;addressid/{addressid};appBuild/167707;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS {iosV} like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/null;supportJDSHWK/1'
|
else:
|
return UserAgent
|
## 获取通知服务
|
class msg(object):
|
def __init__(self, m):
|
self.str_msg = m
|
self.message()
|
def message(self):
|
global msg_info
|
print(self.str_msg)
|
try:
|
msg_info = "{}\n{}".format(msg_info, self.str_msg)
|
except:
|
msg_info = "{}".format(self.str_msg)
|
sys.stdout.flush()
|
def getsendNotify(self, a=0):
|
if a == 0:
|
a += 1
|
try:
|
url = 'https://gitee.com/curtinlv/Public/raw/master/sendNotify.py'
|
response = requests.get(url)
|
if 'curtinlv' in response.text:
|
with open('sendNotify.py', "w+", encoding="utf-8") as f:
|
f.write(response.text)
|
else:
|
if a < 5:
|
a += 1
|
return self.getsendNotify(a)
|
else:
|
pass
|
except:
|
if a < 5:
|
a += 1
|
return self.getsendNotify(a)
|
else:
|
pass
|
def main(self):
|
global send
|
cur_path = os.path.abspath(os.path.dirname(__file__))
|
sys.path.append(cur_path)
|
if os.path.exists(cur_path + "/sendNotify.py"):
|
try:
|
from sendNotify import send
|
except:
|
self.getsendNotify()
|
try:
|
from sendNotify import send
|
except:
|
print("加载通知服务失败~")
|
else:
|
self.getsendNotify()
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.