This commit is contained in:
Faker 2022-10-27 16:56:02 +08:00
parent e019983161
commit 7deceab675
13 changed files with 32 additions and 45 deletions

View File

@ -0,0 +1,3 @@
2022-08-30 v1.0
2022-09-21 v2.0
2022-10-27 v3.0

View File

@ -25,7 +25,7 @@ try:
except ImportError as e:
print(e)
if "No module" in str(e):
print("请先运行HarbourJ库依赖一键安装脚本(jd_check_dependent.py)安装jd_sign.so依赖")
print("请先运行Faker库依赖一键安装脚本(jd_check_dependent.py)安装jd_sign.so依赖")
try:
from jdCookie import get_cookies
getCk = get_cookies()

View File

@ -26,7 +26,7 @@ try:
except ImportError as e:
print(e)
if "No module" in str(e):
print("请先运行HarbourJ库依赖一键安装脚本(jd_check_dependent.py)安装jd_sign.so依赖")
print("请先运行Faker库依赖一键安装脚本(jd_check_dependent.py)安装jd_sign.so依赖")
try:
from jdCookie import get_cookies
getCk = get_cookies()

View File

@ -24,7 +24,7 @@ try:
except ImportError as e:
print(e)
if "No module" in str(e):
print("请先运行HarbourJ库依赖一键安装脚本(jd_check_dependent.py)安装jd_sign.so依赖")
print("请先运行Faker库依赖一键安装脚本(jd_check_dependent.py)安装jd_sign.so依赖")
try:
from jdCookie import get_cookies
getCk = get_cookies()

View File

@ -334,7 +334,8 @@ def shopmember(cookie):
def bindWithVender(cookie):
try:
body = {"venderId": user_id, "shopId": user_id, "bindByVerifyCodeFlag": 1,"registerExtend": {},"writeChildFlag":0, "channel": 401}
url = f'https://api.m.jd.com/client.action?appid=jd_shop_member&functionId=bindWithVender&body={json.dumps(body)}&client=H5&clientVersion=9.2.0&uuid=88888&h5st=20220614102046318%3B7327310984571307%3Bef79a%3Btk02wa31b1c7718neoZNHBp75rw4pE%2Fw7fXko2SdFCd1vIeWy005pEHdm0lw2CimWpaw3qc9il8r9xVLHp%2Bhzmo%2B4swg%3Bdd9526fc08234276b392435c8623f4a737e07d4503fab90bf2cd98d2a3a778ac%3B3.0%3B1655173246318'
h5st = getH5st("bindWithVender", body)
url = f"https://api.m.jd.com/client.action?appid=jd_shop_member&functionId=bindWithVender&body={quote_plus(json.dumps(body, separators=(',', ':')))}&client=H5&clientVersion=9.2.0&uuid=88888&h5st={h5st}"
headers = {
'Host': 'api.m.jd.com',
'Cookie': cookie,
@ -345,7 +346,7 @@ def bindWithVender(cookie):
'Referer': f'https://shopmember.m.jd.com/shopcard/?venderId={user_id}&channel=401&returnUrl={quote_plus(activityUrl + "&isOpenCard=1")}'
}
response = requests.get(url=url, headers=headers, timeout=30).text
res = json.loads(response)
res = json.loads(re.match(".*?({.*}).*", response, re.S).group(1))
if res['success']:
open_result = res['message']
if "火爆" in open_result:

View File

@ -485,7 +485,8 @@ def bindWithVender(cookie, venderId):
shopcard_url0 = f"https://lzdz1-isv.isvjcloud.com/dingzhi/joinCommon/activity/7854908?activityId={activityId}&shareUuid={shareUuid}"
shopcard_url = f"https://shopmember.m.jd.com/shopcard/?venderId={venderId}&channel=401&returnUrl={quote_plus(shopcard_url0)}"
body = {"venderId": venderId, "bindByVerifyCodeFlag": 1,"registerExtend": {},"writeChildFlag":0, "channel": 401}
url = f'https://api.m.jd.com/client.action?appid=jd_shop_member&functionId=bindWithVender&body={json.dumps(body)}&client=H5&clientVersion=9.2.0&uuid=88888&h5st=20220614102046318%3B7327310984571307%3Bef79a%3Btk02wa31b1c7718neoZNHBp75rw4pE%2Fw7fXko2SdFCd1vIeWy005pEHdm0lw2CimWpaw3qc9il8r9xVLHp%2Bhzmo%2B4swg%3Bdd9526fc08234276b392435c8623f4a737e07d4503fab90bf2cd98d2a3a778ac%3B3.0%3B1655173246318'
h5st = getH5st("bindWithVender", body)
url = f"https://api.m.jd.com/client.action?appid=jd_shop_member&functionId=bindWithVender&body={quote_plus(json.dumps(body, separators=(',', ':')))}&client=H5&clientVersion=9.2.0&uuid=88888&h5st={h5st}"
headers = {
'Host': 'api.m.jd.com',
'Cookie': cookie,
@ -496,7 +497,7 @@ def bindWithVender(cookie, venderId):
'Referer': shopcard_url
}
response = requests.get(url=url, headers=headers, timeout=30).text
res = json.loads(response)
res = json.loads(re.match(".*?({.*}).*", response, re.S).group(1))
if res['success']:
return res['message']
except Exception as e:

View File

@ -1,11 +1,15 @@
/*
空气183672
cron "8 15 25 10 *" jd_mfredrain.js
自行替换
cron "1 1 1 1 1" jd_mfredrain.js
默认不执行
*/
const $ = new Env('魔方红包雨');
const notify = $.isNode() ? require('./sendNotify') : '';
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
let jdNotify = true;
let cookiesArr = [], cookie = '', message = '';
let encryptProjectId = '3NhNqgKD5WYkmLLsudX1Z2vVS5pP';
@ -17,6 +21,8 @@ if ($.isNode()) {
} else {
cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item);
}
const JD_API_HOST = 'https://api.m.jd.com/client.action';
!(async () => {
if (!cookiesArr[0]) {
@ -41,7 +47,7 @@ const JD_API_HOST = 'https://api.m.jd.com/client.action';
}
await dotask();
await $.wait(1500)
await $.wait(1800)
}
}
})()

View File

@ -24,7 +24,7 @@ try:
except ImportError as e:
print(e)
if "No module" in str(e):
print("请先运行HarbourJ库依赖一键安装脚本(jd_check_dependent.py)安装jd_sign.so依赖")
print("请先运行Faker库依赖一键安装脚本(jd_check_dependent.py)安装jd_sign.so依赖")
try:
from jdCookie import get_cookies
getCk = get_cookies()

File diff suppressed because one or more lines are too long

View File

@ -34,7 +34,7 @@ try:
from jdCookie import get_cookies
getCk = get_cookies()
except:
print("请先下载依赖脚本,\n下载链接: https://raw.githubusercontent.com/shufflewzc/faker2/main/jdCookie.py")
print("请先下载依赖脚本,\n下载链接: https://raw.githubusercontent.com/HarbourJ/HarbourToulu/main/jdCookie.py")
sys.exit(3)
redis_url = os.environ.get("redis_url") if os.environ.get("redis_url") else "172.17.0.1"
@ -465,7 +465,8 @@ def bindWithVender(cookie, venderId):
shopcard_url0 = f"https://lzdz1-isv.isvjcloud.com/dingzhi/shop/league/activity/7854908?activityId={activityId}&shareUuid={shareUuid}"
shopcard_url = f"https://shopmember.m.jd.com/shopcard/?venderId={venderId}&channel=401&returnUrl={quote_plus(shopcard_url0)}"
body = {"venderId": venderId, "bindByVerifyCodeFlag": 1,"registerExtend": {},"writeChildFlag":0, "channel": 401}
url = f'https://api.m.jd.com/client.action?appid=jd_shop_member&functionId=bindWithVender&body={json.dumps(body)}&client=H5&clientVersion=9.2.0&uuid=88888&h5st=20220614102046318%3B7327310984571307%3Bef79a%3Btk02wa31b1c7718neoZNHBp75rw4pE%2Fw7fXko2SdFCd1vIeWy005pEHdm0lw2CimWpaw3qc9il8r9xVLHp%2Bhzmo%2B4swg%3Bdd9526fc08234276b392435c8623f4a737e07d4503fab90bf2cd98d2a3a778ac%3B3.0%3B1655173246318'
h5st = getH5st("bindWithVender", body)
url = f"https://api.m.jd.com/client.action?appid=jd_shop_member&functionId=bindWithVender&body={quote_plus(json.dumps(body, separators=(',', ':')))}&client=H5&clientVersion=9.2.0&uuid=88888&h5st={h5st}"
headers = {
'Host': 'api.m.jd.com',
'Cookie': cookie,
@ -476,7 +477,7 @@ def bindWithVender(cookie, venderId):
'Referer': shopcard_url
}
response = requests.get(url=url, headers=headers, timeout=30).text
res = json.loads(response)
res = json.loads(re.match(".*?({.*}).*", response, re.S).group(1))
if res['success']:
return res['message']
except Exception as e:
@ -637,6 +638,8 @@ if __name__ == '__main__':
print(f"\t🎉🎉{venderCardName} {open_result}")
assStat = True
time.sleep(1.5)
checkOpenCard(shareUuid, actorUuid)
time.sleep(0.5)
activityContent(pin, yunMidImageUrl, nickname)
time.sleep(0.5)
drawContent(pin)

File diff suppressed because one or more lines are too long

View File

@ -378,7 +378,8 @@ def bindWithVender(cookie, venderId):
try:
shopcard_url = f"https://shopmember.m.jd.com/shopcard/?venderId={venderId}&channel=401&returnUrl={quote_plus(activityUrl)}"
body = {"venderId": venderId, "bindByVerifyCodeFlag": 1,"registerExtend": {},"writeChildFlag":0, "channel": 401}
url = f'https://api.m.jd.com/client.action?appid=jd_shop_member&functionId=bindWithVender&body={json.dumps(body)}&client=H5&clientVersion=9.2.0&uuid=88888&h5st=20220614102046318%3B7327310984571307%3Bef79a%3Btk02wa31b1c7718neoZNHBp75rw4pE%2Fw7fXko2SdFCd1vIeWy005pEHdm0lw2CimWpaw3qc9il8r9xVLHp%2Bhzmo%2B4swg%3Bdd9526fc08234276b392435c8623f4a737e07d4503fab90bf2cd98d2a3a778ac%3B3.0%3B1655173246318'
h5st = getH5st("bindWithVender", body)
url = f"https://api.m.jd.com/client.action?appid=jd_shop_member&functionId=bindWithVender&body={quote_plus(json.dumps(body, separators=(',', ':')))}&client=H5&clientVersion=9.2.0&uuid=88888&h5st={h5st}"
headers = {
'Host': 'api.m.jd.com',
'Cookie': cookie,
@ -389,7 +390,7 @@ def bindWithVender(cookie, venderId):
'Referer': shopcard_url
}
response = requests.get(url=url, headers=headers, timeout=30).text
res = json.loads(response)
res = json.loads(re.match(".*?({.*}).*", response, re.S).group(1))
if res['success']:
return res['message']
except Exception as e:

View File

@ -27,7 +27,7 @@ try:
except ImportError as e:
print(e)
if "No module" in str(e):
print("请先运行HarbourJ库依赖一键安装脚本(jd_check_dependent.py)安装jd_sign.so依赖")
print("请先运行Faker库依赖一键安装脚本(jd_check_dependent.py)安装jd_sign.so依赖")
try:
from jdCookie import get_cookies
getCk = get_cookies()