Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions jd_blueCoin.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ def getCookie(self):
global cookies
ckfile = self.getckfile()
try:
if "JD_COOKIE" in os.environ:
if len(os.environ["JD_COOKIE"]) > 10:
cookies = os.environ["JD_COOKIE"]
printT("已获取并使用Env环境 Cookie")
if os.path.exists(ckfile):
with open(ckfile, "r", encoding="utf-8") as f:
cks = f.read()
Expand All @@ -126,10 +130,6 @@ def getCookie(self):
cks = "#多账号换行,以下示例:(通过正则获取此文件的ck,理论上可以自定义名字标记ck,也可以随意摆放ck)\n账号1【Curtinlv】cookie1;\n账号2【TopStyle】cookie2;"
f.write(cks)
f.close()
if "JD_COOKIE" in os.environ:
if len(os.environ["JD_COOKIE"]) > 10:
cookies = os.environ["JD_COOKIE"]
printT("已获取并使用Env环境 Cookie")
except Exception as e:
printT(f"【getCookie Error】{e}")

Expand Down Expand Up @@ -205,7 +205,7 @@ def iscookie(self):
getCk.getCookie()

# 获取v4环境 特殊处理
if os.path.exists(v4f):
if os.path.exists(v4f) and "JD_COOKIE" not in os.environ:
try:
with open(v4f, 'r', encoding='utf-8') as f:
curenv = locals()
Expand Down Expand Up @@ -580,4 +580,4 @@ def start():
if '成功兑换' in msg_info:
send(script_name, msg_info)
except:
pass
pass
10 changes: 5 additions & 5 deletions jd_cashHelp.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ def getCookie(self):
global cookies
ckfile = self.getckfile()
try:
if "JD_COOKIE" in os.environ:
if len(os.environ["JD_COOKIE"]) > 10:
cookies = os.environ["JD_COOKIE"]
print("已获取并使用Env环境 Cookie")
if os.path.exists(ckfile):
with open(ckfile, "r", encoding="utf-8") as f:
cks = f.read()
Expand All @@ -137,10 +141,6 @@ def getCookie(self):
cks = "#多账号换行,以下示例:(通过正则获取此文件的ck,理论上可以自定义名字标记ck,也可以随意摆放ck)\n账号1【Curtinlv】cookie1;\n账号2【TopStyle】cookie2;"
f.write(cks)
f.close()
if "JD_COOKIE" in os.environ:
if len(os.environ["JD_COOKIE"]) > 10:
cookies = os.environ["JD_COOKIE"]
print("已获取并使用Env环境 Cookie")
except Exception as e:
print(f"【getCookie Error】{e}")

Expand Down Expand Up @@ -216,7 +216,7 @@ def iscookie(self):
getCk.getCookie()

# 获取v4环境 特殊处理
if os.path.exists(v4f):
if os.path.exists(v4f) and "JD_COOKIE" not in os.environ:
try:
with open(v4f, 'r', encoding='utf-8') as f:
curenv = locals()
Expand Down
12 changes: 6 additions & 6 deletions jd_jxgc_tuan.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ def getCookie(self):
global cookies
ckfile = self.getckfile()
try:
if "JD_COOKIE" in os.environ:
if len(os.environ["JD_COOKIE"]) > 10:
cookies = os.environ["JD_COOKIE"]
print("已获取并使用Env环境 Cookie")
if os.path.exists(ckfile):
with open(ckfile, "r", encoding="utf-8") as f:
cks = f.read()
Expand All @@ -134,10 +138,6 @@ def getCookie(self):
cks = "#多账号换行,以下示例:(通过正则获取此文件的ck,理论上可以自定义名字标记ck,也可以随意摆放ck)\n账号1【Curtinlv】cookie1;\n账号2【TopStyle】cookie2;"
f.write(cks)
f.close()
if "JD_COOKIE" in os.environ:
if len(os.environ["JD_COOKIE"]) > 10:
cookies = os.environ["JD_COOKIE"]
print("已获取并使用Env环境 Cookie")
except Exception as e:
print(f"【getCookie Error】{e}")

Expand Down Expand Up @@ -213,7 +213,7 @@ def iscookie(self):
getCk.getCookie()

# 获取v4环境 特殊处理
if os.path.exists(v4f):
if os.path.exists(v4f) and "JD_COOKIE" not in os.environ:
try:
with open(v4f, 'r', encoding='utf-8') as f:
curenv = locals()
Expand Down Expand Up @@ -597,4 +597,4 @@ def start():
except:
pass
if __name__ == '__main__':
start()
start()
12 changes: 7 additions & 5 deletions jd_qjd.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@ def getCookie(self):
global cookies
ckfile = self.getckfile()
try:
if "JD_COOKIE" in os.environ:
if len(os.environ["JD_COOKIE"]) > 10:
cookies = os.environ["JD_COOKIE"]
print("已获取并使用Env环境 Cookie")

if os.path.exists(ckfile):
with open(ckfile, "r", encoding="utf-8") as f:
cks = f.read()
Expand All @@ -195,10 +200,7 @@ def getCookie(self):
cks = "#多账号换行,以下示例:(通过正则获取此文件的ck,理论上可以自定义名字标记ck,也可以随意摆放ck)\n账号1【Curtinlv】cookie1;\n账号2【TopStyle】cookie2;"
f.write(cks)
f.close()
if "JD_COOKIE" in os.environ:
if len(os.environ["JD_COOKIE"]) > 10:
cookies = os.environ["JD_COOKIE"]
print("已获取并使用Env环境 Cookie")

except Exception as e:
print(f"【getCookie Error】{e}")

Expand Down Expand Up @@ -273,7 +275,7 @@ def iscookie(self):
getCk = getJDCookie()
getCk.getCookie()
# 获取v4环境 特殊处理
if os.path.exists(v4f):
if os.path.exists(v4f) and "JD_COOKIE" not in os.environ:
try:
with open(v4f, 'r', encoding='utf-8') as f:
curenv = locals()
Expand Down