API 请求超时由 3000 改为 10000
This commit is contained in:
@ -1168,7 +1168,7 @@ async function initForFarm() {
|
||||
"User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0"),
|
||||
"Content-Type": "application/x-www-form-urlencoded"
|
||||
},
|
||||
timeout: 3000,
|
||||
timeout: 10000,
|
||||
};
|
||||
$.post(option, (err, resp, data) => {
|
||||
try {
|
||||
@ -1240,7 +1240,7 @@ function timeFormat(time) {
|
||||
}
|
||||
function readShareCode() {
|
||||
return new Promise(async resolve => {
|
||||
$.get({url: `http://api.turinglabs.net/api/v1/jd/farm/read/${randomCount}/`, timeout: 3000,}, (err, resp, data) => {
|
||||
$.get({url: `http://api.turinglabs.net/api/v1/jd/farm/read/${randomCount}/`, timeout: 10000,}, (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`)
|
||||
@ -1357,7 +1357,7 @@ function TotalBean() {
|
||||
"Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2",
|
||||
"User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0")
|
||||
},
|
||||
"timeout": 3000,
|
||||
"timeout": 10000,
|
||||
}
|
||||
$.post(options, (err, resp, data) => {
|
||||
try {
|
||||
@ -1426,7 +1426,7 @@ function taskUrl(function_id, body = {}) {
|
||||
Cookie: cookie,
|
||||
UserAgent: $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0"),
|
||||
},
|
||||
timeout: 3000,
|
||||
timeout: 10000,
|
||||
}
|
||||
}
|
||||
// prettier-ignore
|
||||
|
@ -504,7 +504,7 @@ function queryVkComponent() {
|
||||
"User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0"),
|
||||
"Accept-Language": `zh-Hans-CN;q=1, en-CN;q=0.9`,
|
||||
},
|
||||
"timeout": 3000,
|
||||
"timeout": 10000,
|
||||
}
|
||||
$.post(options, (err, resp, data) => {
|
||||
try {
|
||||
@ -622,7 +622,7 @@ function jdfactory_getHomeData() {
|
||||
function readShareCode() {
|
||||
console.log(`开始`)
|
||||
return new Promise(async resolve => {
|
||||
$.get({url: `http://api.turinglabs.net/api/v1/jd/ddfactory/read/${randomCount}/`, timeout: 3000}, (err, resp, data) => {
|
||||
$.get({url: `http://api.turinglabs.net/api/v1/jd/ddfactory/read/${randomCount}/`, timeout: 10000}, (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`)
|
||||
@ -697,7 +697,7 @@ function taskPostUrl(function_id, body = {}, function_id2) {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
"User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0"),
|
||||
},
|
||||
timeout: 3000,
|
||||
timeout: 10000,
|
||||
}
|
||||
}
|
||||
function TotalBean() {
|
||||
@ -714,7 +714,7 @@ function TotalBean() {
|
||||
"Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2",
|
||||
"User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0")
|
||||
},
|
||||
"timeout": 3000,
|
||||
"timeout": 10000,
|
||||
}
|
||||
$.post(options, (err, resp, data) => {
|
||||
try {
|
||||
|
@ -416,7 +416,7 @@ function submitInviteId(userName) {
|
||||
$.post(
|
||||
{
|
||||
url: `https://api.ninesix.cc/api/jx-nc/${$.info.smp}/${encodeURIComponent(userName)}?active=${$.info.active}`,
|
||||
timeout: 3000
|
||||
timeout: 10000
|
||||
},
|
||||
(err, resp, _data) => {
|
||||
try {
|
||||
@ -442,7 +442,7 @@ function submitInviteId(userName) {
|
||||
function getAssistUser() {
|
||||
return new Promise(resolve => {
|
||||
try {
|
||||
$.get({url: `https://api.ninesix.cc/api/jx-nc?active=${$.info.active}`, timeout: 3000}, async (err, resp, _data) => {
|
||||
$.get({url: `https://api.ninesix.cc/api/jx-nc?active=${$.info.active}`, timeout: 10000}, async (err, resp, _data) => {
|
||||
try {
|
||||
const {code, data = {}} = JSON.parse(_data);
|
||||
if (data.value) {
|
||||
@ -563,7 +563,7 @@ function taskUrl(function_path, body) {
|
||||
Host: `wq.jd.com`,
|
||||
'Accept-Language': `zh-cn`,
|
||||
},
|
||||
timeout: 3000,
|
||||
timeout: 10000,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -514,7 +514,7 @@ async function plantBeanIndex() {
|
||||
}
|
||||
function readShareCode() {
|
||||
return new Promise(async resolve => {
|
||||
$.get({url: `http://api.turinglabs.net/api/v1/jd/bean/read/${randomCount}/`, timeout: 3000}, (err, resp, data) => {
|
||||
$.get({url: `http://api.turinglabs.net/api/v1/jd/bean/read/${randomCount}/`, timeout: 10000}, (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`)
|
||||
@ -636,7 +636,7 @@ function requestGet(function_id, body = {}) {
|
||||
'Accept-Encoding': 'gzip, deflate, br',
|
||||
'Content-Type': "application/x-www-form-urlencoded"
|
||||
},
|
||||
timeout: 3000,
|
||||
timeout: 10000,
|
||||
};
|
||||
$.get(option, (err, resp, data) => {
|
||||
try {
|
||||
@ -668,7 +668,7 @@ function TotalBean() {
|
||||
"Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2",
|
||||
"User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0")
|
||||
},
|
||||
"timeout": 3000,
|
||||
"timeout": 10000,
|
||||
}
|
||||
$.post(options, (err, resp, data) => {
|
||||
try {
|
||||
@ -732,7 +732,7 @@ function taskUrl(function_id, body) {
|
||||
"Accept-Encoding": "gzip, deflate, br",
|
||||
"Content-Type": "application/x-www-form-urlencoded"
|
||||
},
|
||||
timeout: 3000,
|
||||
timeout: 10000,
|
||||
}
|
||||
}
|
||||
function getParam(url, name) {
|
||||
|
Reference in New Issue
Block a user