Compare commits

..

43 Commits

Author SHA1 Message Date
Faker
3974a33844 1 2025-07-18 10:59:52 +08:00
Faker
2dc4b7d5c8 update 2025-07-14 11:03:04 +08:00
Faker
e18570f6fb Update dylans.js 2025-07-11 11:00:08 +08:00
Faker
30570be213 Update Rebels_H.js 2025-07-09 11:16:18 +08:00
Faker
dbb6fc90b8 1 2025-07-08 17:14:14 +08:00
Faker
7607920650 1 2025-07-07 15:40:34 +08:00
Faker
45028d66fc 1 2025-07-03 16:17:35 +08:00
Faker
2188446d1f update 2025-07-02 11:06:34 +08:00
Faker
15d03a93de Create jd_dplh0701.js 2025-07-01 18:58:51 +08:00
Faker
b6582c52d6 update 2025-06-30 07:46:54 +08:00
Faker
a00d98da06 update 2025-06-26 12:06:48 +08:00
Faker
e7af99f7bc 1 2025-06-24 10:59:14 +08:00
Faker
443633bb5a 1 2025-06-24 10:56:37 +08:00
Faker
57014b2d98 update 2025-06-23 07:54:11 +08:00
Faker
14f6b07114 Update jd_dwapp.js 2025-06-20 15:21:47 +08:00
Faker
0a757af23d update 2025-06-19 11:04:40 +08:00
Faker
01fa5539ce update 2025-06-18 18:12:11 +08:00
Faker
80f7479e90 update 2025-06-17 10:35:38 +08:00
Faker
64750129e6 update 2025-06-17 10:32:07 +08:00
Faker
c0517d5aef update 2025-06-13 16:55:43 +08:00
Faker
2ef501d115 expired 2025-06-12 10:05:36 +08:00
Faker
c29fc9518e Update jd_daycj.js 2025-06-12 10:01:02 +08:00
Faker
ebd15b65e4 update 2025-06-11 10:55:57 +08:00
Faker
91575bd3eb Update jd_by_sign.js 2025-06-10 19:21:40 +08:00
Faker
47f190adf6 update 2025-06-10 10:58:24 +08:00
Faker
251f43a402 update 2025-06-09 12:33:28 +08:00
Faker
15422263be update 2025-06-06 10:51:15 +08:00
Faker
c4bd4030d6 update 2025-06-05 09:31:53 +08:00
Faker
4740a2199f update 2025-06-03 15:39:10 +08:00
Faker
4f7ef61815 update 2025-05-28 17:30:28 +08:00
Faker
874696a627 update 2025-05-27 11:08:01 +08:00
Faker
9b406d6697 update 2025-05-26 10:59:11 +08:00
Faker
65b7ac0c47 update 2025-05-23 17:10:30 +08:00
Faker
fc29ee3bcf update 2025-05-22 11:11:32 +08:00
Faker
3824523f40 Create jd_ttthb_help.js 2025-05-20 18:04:06 +08:00
Faker
2e5d7c71ec update 2025-05-19 11:06:49 +08:00
Faker
547f5874b4 1 2025-05-16 17:37:02 +08:00
Faker
fead10348d update 2025-05-15 16:57:13 +08:00
Faker
552b9e4b02 Update jd_AutoEval.js 2025-05-14 19:36:14 +08:00
Faker
d5f6254a16 1 2025-05-14 10:44:06 +08:00
Faker
82124cacc3 update 2025-05-13 16:50:53 +08:00
Faker
bb995be6f6 update 2025-05-09 11:19:37 +08:00
Faker
e77856d921 Create jd_hlw_draw.js 2025-05-07 10:29:43 +08:00
86 changed files with 637 additions and 524 deletions

1
function/dyland.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

12
jd_10dou.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

6
jd_daka_bean.js Normal file

File diff suppressed because one or more lines are too long

16
jd_day.js Normal file

File diff suppressed because one or more lines are too long

15
jd_daycj.js Normal file

File diff suppressed because one or more lines are too long

11
jd_dayf.js Normal file

File diff suppressed because one or more lines are too long

14
jd_dayf2.js Normal file

File diff suppressed because one or more lines are too long

7
jd_dddraw.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

18
jd_dplh0617.js Normal file

File diff suppressed because one or more lines are too long

19
jd_dplh0701.js Normal file

File diff suppressed because one or more lines are too long

19
jd_dplh0714.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

7
jd_fdshkj.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

7
jd_fs_sign.js Normal file

File diff suppressed because one or more lines are too long

7
jd_green.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

7
jd_hlw_draw.js Normal file

File diff suppressed because one or more lines are too long

7
jd_jjg.js Normal file

File diff suppressed because one or more lines are too long

8
jd_joypark_leave.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

6
jd_jxzy_sign.js Normal file

File diff suppressed because one or more lines are too long

15
jd_kd_dlcs.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

7
jd_lmdraw.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

11
jd_market_answer.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

7
jd_new_vote.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

14
jd_opencard_0620.js Normal file

File diff suppressed because one or more lines are too long

6
jd_plantBean_help.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

15
jd_quanyi_sign.js Normal file

File diff suppressed because one or more lines are too long

7
jd_sldraw.js Normal file

File diff suppressed because one or more lines are too long

7
jd_taskgBean.js Normal file

File diff suppressed because one or more lines are too long

18
jd_tjfb.js Normal file

File diff suppressed because one or more lines are too long

20
jd_tjfb_help.js Normal file

File diff suppressed because one or more lines are too long

279
jd_try.js
View File

@ -115,7 +115,7 @@ let args_xh = {
* C商品原价99元试用价1元如果下面设置为50那么C商品将会被加入到待提交的试用组
* 默认为0
* */
jdPrice: process.env.JD_TRY_PRICE * 1 || 20,
jdPrice: process.env.JD_TRY_PRICE * 1 || 10,
/*
* 下面有一个function是可以获取tabId列表名为try_tabList
* 可设置环境变量JD_TRY_TABID@进行分隔
@ -138,7 +138,7 @@ let args_xh = {
* C商品原价49元现在试用价1元如果下面设置为1那C商品也会被添加到带提交试用组因为1 = 1
* 可设置环境变量JD_TRY_TRIALPRICE默认为0
* */
trialPrice: process.env.JD_TRY_TRIALPRICE * 1 || 0,
trialPrice: process.env.JD_TRY_TRIALPRICE * 1 || 0.01,
/*
* 最小提供数量例如试用商品只提供2份试用资格当前设置为1则会进行申请
* 若只提供5分试用资格当前设置为10则不会申请
@ -275,7 +275,7 @@ let args_xh = {
}
await try_apply(trialActivityTitleList[i], trialActivityIdList[i]);
console.log(`间隔等待中请等待15秒 \n`);
await $.wait(150000);
await $.wait(15000);
}
console.log('试用申请执行完毕...');
$.giveupNum = 0;
@ -592,142 +592,161 @@ async function initJsToken() {
* 获取商品列表并且过滤
*/
async function try_feedsList(tabId, page) {
const sign = await h5stSign(
{
functionId: 'try_SpecFeedList',
appid: 'newtry',
body: {
tabId: String(tabId),
page: Number(page),
version: 2,
source: 'default',
client: 'outer',
},
'x-api-eid-token': $.jsToken,
},
'35fa0',
);
const sign = await h5stSign(
{
functionId: 'qryH5BabelFloors',
appid: 'newtry',
body: {
activityId: '3C751WNneAUaZ8Lw8xYN7cbSE8gm',
pageId: '5457569',
uuid: '',
queryFloorsParam: {
floorParams: { 115571575: { tabId: tabId, page: page, source: 'lottery', sessionId: 'b5a86af7e7524b50b38e66d1c96cc244' } },
type: 2,
},
siteClient: 'apple',
siteClientVersion: '12.4.1',
},
'x-api-eid-token': $.jsToken,
},
'35fa0'
)
try {
const { data } = await api({
method: 'POST',
url: `http://api.m.jd.com/client.action`,
headers: {
'content-type': 'application/x-www-form-urlencoded',
origin: 'https://prodev.m.jd.com',
Referer: 'https://prodev.m.jd.com/mall/active/3C751WNneAUaZ8Lw8xYN7cbSE8gm/index.html',
'User-Agent': $.userAgent,
'x-referer-page': 'https://prodev.m.jd.com/mall/active/3C751WNneAUaZ8Lw8xYN7cbSE8gm/index.html',
'x-rp-client': 'h5_1.0.0',
},
data: sign.qs,
});
try {
const { data } = await api({
method: 'POST',
url: `http://api.m.jd.com/client.action`,
headers: {
'content-type': 'application/x-www-form-urlencoded',
origin: 'https://prodev.m.jd.com',
Referer: 'https://prodev.m.jd.com/mall/active/3C751WNneAUaZ8Lw8xYN7cbSE8gm/index.html',
'User-Agent': $.userAgent,
'x-referer-page': 'https://prodev.m.jd.com/mall/active/3C751WNneAUaZ8Lw8xYN7cbSE8gm/index.html',
'x-rp-client': 'h5_1.0.0',
},
data: sign.qs,
})
let tempKeyword = ``;
if (data.code === '0') {
console.log(`${size++} 次获取试用商品成功tabId:${args_xh.tabId[$.nowTabIdIndex]} 的 第 ${page}`);
console.log(`获取到商品 ${data.data.feedList.length}`);
for (let item of data.data.feedList) {
if (item.applyNum === null) {
args_xh.printLog ? console.log(`商品未到申请时间:${item.skuTitle}\n`) : '';
continue;
let tempKeyword = ``
// 兼容两种结构
let feedList, hasNext;
if (data.data && data.data.feedList) {
feedList = data.data.feedList;
hasNext = data.data.hasNext;
} else if (
data.floorResponse &&
data.floorResponse['115571575'] &&
data.floorResponse['115571575'].providerData &&
data.floorResponse['115571575'].providerData.data &&
data.floorResponse['115571575'].providerData.data.feedsComponent
) {
feedList = data.floorResponse['115571575'].providerData.data.feedsComponent.feedList;
hasNext = data.floorResponse['115571575'].providerData.data.feedsComponent.hasNext;
}
if (trialActivityIdList.length >= args_xh.maxLength) {
console.log('商品列表长度已满.结束获取');
break;
}
if (item.applyState === 1) {
args_xh.printLog ? console.log(`商品已申请试用:${item.skuTitle}\n`) : '';
continue;
}
if (item.applyState !== null) {
args_xh.printLog ? console.log(`商品状态异常未找到skuTitle\n`) : '';
continue;
}
if (args_xh.passZhongCao) {
$.isPush = true;
if (item.tagList.length !== 0) {
for (let itemTag of item.tagList) {
if (itemTag.tagType === 3) {
args_xh.printLog ? console.log('商品被过滤,该商品是种草官专属') : '';
$.isPush = false;
break;
} else if (itemTag.tagType === 5) {
args_xh.printLog ? console.log('商品被跳过,该商品是付费试用!') : '';
$.isPush = false;
break;
}
if (data.code === '0' && feedList) {
console.log(`${size++} 次获取试用商品成功tabId:${args_xh.tabId[$.nowTabIdIndex]} 的 第 ${page}`)
console.log(`获取到商品 ${feedList.length}`)
for (let item of feedList) {
if (item.applyNum === null) {
args_xh.printLog ? console.log(`商品未到申请时间:${item.skuTitle}\n`) : ''
continue
}
if (trialActivityIdList.length >= args_xh.maxLength) {
console.log('商品列表长度已满.结束获取')
break
}
if (item.applyState === 1) {
args_xh.printLog ? console.log(`商品已申请试用:${item.skuTitle}\n`) : ''
continue
}
if (item.applyState !== null) {
args_xh.printLog ? console.log(`商品状态异常未找到skuTitle\n`) : ''
continue
}
if (args_xh.passZhongCao) {
$.isPush = true
if (item.tagList.length !== 0) {
for (let itemTag of item.tagList) {
if (itemTag.tagType === 3) {
args_xh.printLog ? console.log('商品被过滤,该商品是种草官专属') : ''
$.isPush = false
break
} else if (itemTag.tagType === 5) {
args_xh.printLog ? console.log('商品被跳过,该商品是付费试用!') : ''
$.isPush = false
break
}
}
}
}
if (item.skuTitle && $.isPush) {
args_xh.printLog ? console.log(`检测 tabId:${args_xh.tabId[$.nowTabIdIndex]} 的 第 ${page} 页 第 ${$.nowItem++ + 1} 个商品\n${item.skuTitle}`) : ''
if (args_xh.whiteList) {
if (args_xh.whiteListKeywords.some((fileter_word) => item.skuTitle.includes(fileter_word))) {
args_xh.printLog ? console.log(`商品白名单通过将加入试用组trialActivityId为${item.trialActivityId}\n`) : ''
trialActivityIdList.push(item.trialActivityId)
trialActivityTitleList.push(item.skuTitle)
}
} else {
tempKeyword = ``
if (parseFloat(item.jdPrice) <= args_xh.jdPrice) {
args_xh.printLog ? console.log(`商品被过滤,商品价格 ${item.jdPrice} < ${args_xh.jdPrice} \n`) : ''
} else if (parseFloat(item.supplyNum) < args_xh.minSupplyNum && item.supplyNum !== null) {
args_xh.printLog ? console.log(`商品被过滤,提供申请的份数小于预设申请的份数 \n`) : ''
} else if (parseFloat(item.applyNum) > args_xh.applyNumFilter && item.applyNum !== null) {
args_xh.printLog ? console.log(`商品被过滤,已申请人数大于预设的${args_xh.applyNumFilter}\n`) : ''
} else if (item.jdPrice === null) {
args_xh.printLog ? console.log(`商品被过滤,商品无价,不能申请 \n`) : ''
} else if (parseFloat(item.trialPrice) > args_xh.trialPrice) {
args_xh.printLog ? console.log(`商品被过滤,商品试用价大于预设试用价 \n`) : ''
} else if (args_xh.titleFilters.some((fileter_word) => (item.skuTitle.includes(fileter_word) ? (tempKeyword = fileter_word) : ''))) {
args_xh.printLog ? console.log(`商品被过滤,含有关键词 ${tempKeyword}\n`) : ''
} else {
args_xh.printLog ? console.log(`商品通过加入试用组trialActivityId为${item.trialActivityId}\n`) : ''
if (trialActivityIdList.indexOf(item.trialActivityId) === -1) {
trialActivityIdList.push(item.trialActivityId)
trialActivityTitleList.push(item.skuTitle)
}
}
}
} else if ($.isPush !== false) {
console.error('skuTitle解析异常')
return
}
}
}
}
if (item.skuTitle && $.isPush) {
args_xh.printLog ? console.log(`检测 tabId:${args_xh.tabId[$.nowTabIdIndex]} 的 第 ${page} 页 第 ${$.nowItem++ + 1} 个商品\n${item.skuTitle}`) : '';
if (args_xh.whiteList) {
if (args_xh.whiteListKeywords.some((fileter_word) => item.skuTitle.includes(fileter_word))) {
args_xh.printLog ? console.log(`商品白名单通过将加入试用组trialActivityId为${item.trialActivityId}\n`) : '';
trialActivityIdList.push(item.trialActivityId);
trialActivityTitleList.push(item.skuTitle);
}
} else {
tempKeyword = ``;
if (parseFloat(item.jdPrice) <= args_xh.jdPrice) {
args_xh.printLog ? console.log(`商品被过滤,商品价格 ${item.jdPrice} < ${args_xh.jdPrice} \n`) : '';
} else if (parseFloat(item.supplyNum) < args_xh.minSupplyNum && item.supplyNum !== null) {
args_xh.printLog ? console.log(`商品被过滤,提供申请的份数小于预设申请的份数 \n`) : '';
} else if (parseFloat(item.applyNum) > args_xh.applyNumFilter && item.applyNum !== null) {
args_xh.printLog ? console.log(`商品被过滤,已申请人数大于预设的${args_xh.applyNumFilter}\n`) : '';
} else if (item.jdPrice === null) {
args_xh.printLog ? console.log(`商品被过滤,商品无价,不能申请 \n`) : '';
} else if (parseFloat(item.trialPrice) > args_xh.trialPrice) {
args_xh.printLog ? console.log(`商品被过滤,商品试用价大于预设试用价 \n`) : '';
} else if (args_xh.titleFilters.some((fileter_word) => (item.skuTitle.includes(fileter_word) ? (tempKeyword = fileter_word) : ''))) {
args_xh.printLog ? console.log(`商品被过滤,含有关键词 ${tempKeyword}\n`) : '';
console.log(`当前试用组长度为:${trialActivityIdList.length}`)
console.log(`下一页状态:${hasNext}`)
if (hasNext === false) {
if ($.nowTabIdIndex < args_xh.tabId.length) {
$.nowTabIdIndex++
$.nowPage = 1
$.nowItem = 1
$.retrynum = 0
} else {
// 这下是真的没了
$.retrynum = 999
}
} else {
args_xh.printLog ? console.log(`商品通过加入试用组trialActivityId为${item.trialActivityId}\n`) : '';
if (trialActivityIdList.indexOf(item.trialActivityId) === -1) {
trialActivityIdList.push(item.trialActivityId);
trialActivityTitleList.push(item.skuTitle);
}
$.nowPage++
$.retrynum = 0
}
}
} else if ($.isPush !== false) {
console.error('skuTitle解析异常');
return;
}
}
console.log(`当前试用组长度为:${trialActivityIdList.length}`);
console.log(`下一页状态:${data.data.hasNext}`);
if (data.data.hasNext === false) {
if ($.nowTabIdIndex < args_xh.tabId.length) {
$.nowTabIdIndex++;
$.nowPage = 1;
$.nowItem = 1;
$.retrynum = 0;
} else {
// 这下是真的没了
$.retrynum = 999;
console.log(`💩 获得试用列表失败: ${data.message}`)
}
} catch (e) {
if (e.message === `Request failed with status code 403`) {
$.retrynum++
if ($.retrynum === 4) {
$.isForbidden = true
$.log('多次尝试失败,换个时间再试!')
} else {
console.log(`403${$.retrynum} 次重试`)
}
} else {
console.log(e.message)
console.log(`${$.name} API请求失败请检查网路重试`)
}
} else {
$.nowPage++;
$.retrynum = 0;
}
} else {
console.log(`💩 获得试用列表失败: ${data.message}`);
}
} catch (e) {
if (e.message === `Request failed with status code 403`) {
$.retrynum++;
if ($.retrynum === 4) {
$.isForbidden = true;
$.log('多次尝试失败,换个时间再试!');
} else {
console.log(`403${$.retrynum} 次重试`);
}
} else {
console.log(e.message);
console.log(`${$.name} API请求失败请检查网路重试`);
}
}
}
async function h5stSign(body, appId, version) {

13
jd_ttchb_draw.js Normal file

File diff suppressed because one or more lines are too long

18
jd_ttthb_help.js Normal file

File diff suppressed because one or more lines are too long

7
jd_ttzd.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

8
jd_wduoyu.js Normal file

File diff suppressed because one or more lines are too long

View File

@ -42,8 +42,29 @@ def randomuserAgent():
def get_proxy_api(proxy_url, max_retries=5, timeout=60, retry_delay=1):
session = requests.Session()
for retry in range(max_retries):
res = get(url=proxy_url)
if '@' in proxy_url:
# 解析认证信息
auth_part, url_part = proxy_url.split('@')
protocol = auth_part.split('://')[0]
auth_part = auth_part.split('://')[1]
host = url_part
# 处理只有 token 的情况
if ':' in auth_part:
username, password = auth_part.split(':')
session.auth = (username, password)
else:
# 只有 token 的情况,需要 base64 编码
token = auth_part
token_b64 = base64.b64encode(token.encode()).decode()
session.headers.update({'Authorization': f'Basic {token_b64}'})
res = session.get(f"{protocol}://{host}", verify=False, timeout=timeout)
else:
res = session.get(proxy_url, verify=False, timeout=timeout)
printf(f"本次获取到的代理:{res.text}")
proxy_ip_port = res.text.strip()
proxy_address = f"http://{proxy_ip_port}"
@ -242,7 +263,7 @@ def get_sign_diy(pin):
def getcookie_wskey(key):
proxys = proxy_url
if os.environ.get("WSKEY_PROXY_URL") is not None:
if os.environ.get("DY_PROXY") is not None:
proxys = get_proxy_api(proxy_url)
body = "body=%7B%22to%22%3A%22https%3A//plogin.m.jd.com/jd-mlogin/static/html/appjmp_blank.html%22%7D"
@ -270,7 +291,7 @@ def getcookie_wskey(key):
printf(f"【错误】{unquote(pin)}在获取token时\n{error}")
return pin, "False"
randomuserAgent()
if os.environ.get("WSKEY_PROXY_URL") is not None:
if os.environ.get("DY_PROXY") is not None:
proxys = get_proxy_api(proxy_url)
continue
@ -280,7 +301,7 @@ def getcookie_wskey(key):
printf(f"【警告】{unquote(pin)}在获取token时失败等待5秒后重试")
time.sleep(5)
randomuserAgent()
if os.environ.get("WSKEY_PROXY_URL") is not None:
if os.environ.get("DY_PROXY") is not None:
proxys = get_proxy_api(proxy_url)
if token=="xxx":
@ -307,7 +328,7 @@ def getcookie_wskey(key):
printf(f"【错误】{unquote(pin)}在获取cookie时\n{error}")
return "Error"
randomuserAgent()
if os.environ.get("WSKEY_PROXY_URL") is not None:
if os.environ.get("DY_PROXY") is not None:
proxys = get_proxy_api(proxy_url)
continue
@ -424,34 +445,40 @@ def getRemark(pt_pin,token):
return strreturn
def get_latest_file(files):
latest_file = None
latest_mtime = 0
for file in files:
try:
stats = os.stat(file)
mtime = stats.st_mtime
if mtime > latest_mtime:
latest_mtime = mtime
latest_file = file
except FileNotFoundError:
continue
return latest_file
def main():
printf("版本: 20230602")
printf("说明: 如果用Wxpusher通知需配置WP_APP_TOKEN_ONE和WP_APP_MAIN_UID其中WP_APP_MAIN_UID是你的Wxpusher UID")
printf("隧道型代理池接口:export WSKEY_PROXY_TUNNRL='http://127.0.0.1:123456'")
printf("拉取型代理API接口(数据格式:txt;提取数量:每次一个):export WSKEY_PROXY_URL='http://xxx.com/apiUrl'")
printf("拉取型代理API接口(数据格式:txt;提取数量:每次一个):export DY_PROXY='http://xxx.com/apiUrl'")
printf("没有代理可以自行注册比如携趣巨量每日免费1000IP完全够用")
printf("====================================")
config=""
envtype=""
global proxy_url
proxy_url=os.environ.get("WSKEY_PROXY_URL") or os.environ.get("WSKEY_PROXY_TUNNRL") or None
proxy_url=os.environ.get("DY_PROXY") or os.environ.get("WSKEY_PROXY_TUNNRL") or None
iswxpusher=False
counttime=0
if os.path.exists("/ql/config/auth.json"):
config="/ql/config/auth.json"
envtype="ql"
if os.path.exists("/ql/data/db/keyv.sqlite"):
config="/ql/data/db/keyv.sqlite"
envtype="ql_latest"
if os.path.exists("/ql/data/config/auth.json"):
config="/ql/data/config/auth.json"
envtype="ql"
if os.path.exists("/jd/config/auth.json"):
config="/jd/config/auth.json"
envtype="arcadia"
token_file_list = ['/ql/data/db/keyv.sqlite', '/ql/data/config/auth.json', '/ql/config/auth.json']
config = get_latest_file(token_file_list)
envtype="ql"
if os.path.exists("/arcadia/config/auth.json"):
config="/arcadia/config/auth.json"
@ -473,7 +500,7 @@ def main():
iswxpusher=False
if proxy_url is None:
printf("没有配置代理,无法使用代理!\n请配置环境变量WSKEY_PROXY_TUNNRL或WSKEY_PROXY_URL\n")
printf("没有配置代理,无法使用代理!\n请配置环境变量WSKEY_PROXY_TUNNRL或DY_PROXY\n")
printf("====================================")
else:
printf(f"已配置代理: {proxy_url}\n")
@ -484,8 +511,16 @@ def main():
summary=""
if envtype == "ql":
with open(config, "r", encoding="utf-8") as f1:
token = json.load(f1)['token']
if 'keyv' in config:
with open(config, "r", encoding="latin1") as file:
auth = file.read()
matches = re.search(r'"token":"([^"]*)"(?!.*"token":)', auth)
token = matches.group(1)
else:
with open(config, "r") as file:
auth = file.read()
auth = json.loads(auth)
token = auth["token"]
url = 'http://127.0.0.1:5600/api/envs'
headers = {'Authorization': f'Bearer {token}'}
body = {
@ -501,20 +536,7 @@ def main():
url = 'http://127.0.0.1:5678/openApi/count'
headers = {'Content-Type': 'application/json', 'Authorization': 'Bearer ', 'api-token': f'{token}'}
datas = get(url, headers=headers).json()["data"]["accountCount"]
elif envtype == "ql_latest":
with open(config, "r", encoding="latin1") as f1:
content = f1.read()
matches = re.search(r'token":"([^"]+)"', content)
try:
token = matches.group(1)
except Exception as e:
sys.exit(0)
url = 'http://127.0.0.1:5600/api/envs'
headers = {'Authorization': f'Bearer {token}'}
body = {
'searchValue': 'JD_WSCK',
'Authorization': f'Bearer {token}'
}
datas = get(url, params=body, headers=headers).json()['data']
@ -524,7 +546,7 @@ def main():
printf("\n错误:没有需要转换的JD_WSCK退出脚本!")
return
if envtype in ('ql','ql_latest'):
if envtype in ('ql',''):
for data in datas:
randomuserAgent()
if data['status']!=0:

File diff suppressed because one or more lines are too long

7
jd_xinqi_draw.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long