This commit is contained in:
Faker 2023-07-24 23:46:42 +08:00
parent d5eb169765
commit 106b505d6d
8 changed files with 40 additions and 30 deletions

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

View File

@ -1,10 +1,8 @@
/*
APP首页-领京豆
金融双签领取
21 3 * * * jd_signbeanact.js
11 4 * * * jd_signbeanact.js
*/
const { cookie } = require('request');
const $ = new Env('领京豆签到');
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
@ -17,9 +15,10 @@ if ($.isNode()) {
} else {
cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonformat($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item);
}
const ua = require('./USER_AGENTS');
const jdVersion = '10.1.2'
const iphoneVersion = [Math.ceil(Math.random() * 2 + 12), Math.ceil(Math.random() * 4)]
const UA = `jdapp;iPhone;${jdVersion};${Math.ceil(Math.random() * 2 + 12)}.${Math.ceil(Math.random() * 4)};${randomString(40)};network/wifi;model/iPhone12,1;addressid/0;appBuild/167802;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS ${iphoneVersion[0]}_${iphoneVersion[1]} like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1`
let UA = `jdapp;iPhone;${jdVersion};${Math.ceil(Math.random() * 2 + 12)}.${Math.ceil(Math.random() * 4)};${randomString(40)};network/wifi;model/iPhone12,1;addressid/0;appBuild/167802;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS ${iphoneVersion[0]}_${iphoneVersion[1]} like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1`
const UUID = UA.split(';') && UA.split(';')[4] || ''
function randomString(e) {
e = e || 32;
@ -40,9 +39,10 @@ function randomString(e) {
$.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1])
$.index = i + 1;
$.bean = 0
UA = ua.UARAM ? ua.UARAM() : ua.USER_AGENT;
console.log(`\n*****开始【京东账号${$.index}${$.UserName}****\n`);
await run();
await $.wait(2000);
await $.wait(3000);
}
}
@ -55,11 +55,11 @@ function randomString(e) {
async function run() {
try {
await takePostRequest('beanTaskList')
await $.wait(200);
//await takePostRequest('beanTaskList')
//await $.wait(500);
await takePostRequest('signBeanAct')
await $.wait(200);
await getdouble();
await $.wait(500);
//await getdouble();
} catch (e) {
console.log(e);
}

10
jd_txtotal.js Normal file

File diff suppressed because one or more lines are too long

View File

@ -340,7 +340,7 @@ def getToken(wskey): # 方法 获取 Wskey转换使用的 Token 由 JD_API 返
# 备用
def getToken_bak(wskey): # 方法 获取 Wskey转换使用的 Token 由 JD_API 返回 这里传递 wskey
try: # 异常捕捉
url = str(base64.b64decode('aHR0cHM6Ly9hcGkubm9sYW5zdG9yZS50b3Av').decode()) + 'sign' # 设置云端服务器地址 路由为 genToken
url = str(base64.b64decode('aHR0cHM6Ly9hcGkubm9sYW5zdG9yZS5jYy8=').decode()) + 'sign' # 设置云端服务器地址 路由为 genToken
header = {"Content-Type": "application/json"} # 设置 HTTP头
data = {'body':{"to":"https%3a%2f%2fplogin.m.jd.com%2fjd-mlogin%2fstatic%2fhtml%2fappjmp_blank.html"},'fn':'genToken'}
params = requests.post(url=url, headers=header, json=data, verify=False, timeout=20).json() # 设置 HTTP请求参数 超时 20秒 Json解析

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long