mirror of
https://github.com/shufflewzc/faker2.git
synced 2025-04-23 10:58:44 +08:00
update
This commit is contained in:
parent
940d90e167
commit
74ac7b4a4e
@ -221,10 +221,12 @@ class JDJRValidator {
|
|||||||
this.data = {};
|
this.data = {};
|
||||||
this.x = 0;
|
this.x = 0;
|
||||||
this.t = Date.now();
|
this.t = Date.now();
|
||||||
|
this.trynum = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(scene) {
|
async run(scene) {
|
||||||
try {
|
try {
|
||||||
|
if (this.trynum > 5) return '';
|
||||||
const tryRecognize = async () => {
|
const tryRecognize = async () => {
|
||||||
const x = await this.recognize(scene);
|
const x = await this.recognize(scene);
|
||||||
|
|
||||||
@ -250,6 +252,7 @@ class JDJRValidator {
|
|||||||
return result;
|
return result;
|
||||||
} else {
|
} else {
|
||||||
console.count("验证失败");
|
console.count("验证失败");
|
||||||
|
this.trynum++
|
||||||
// console.count(JSON.stringify(result));
|
// console.count(JSON.stringify(result));
|
||||||
await sleep(300);
|
await sleep(300);
|
||||||
return await this.run(scene);
|
return await this.run(scene);
|
||||||
@ -542,6 +545,7 @@ function injectToRequest2(fn, scene = 'cww') {
|
|||||||
async function injectToRequest(scene = 'cww') {
|
async function injectToRequest(scene = 'cww') {
|
||||||
console.log('JDJR验证中......');
|
console.log('JDJR验证中......');
|
||||||
const res = await new JDJRValidator().run(scene);
|
const res = await new JDJRValidator().run(scene);
|
||||||
|
if (res == '') return;
|
||||||
return res.validate;
|
return res.validate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,6 +59,7 @@ let FEED_NUM = 20; //喂食数量默认20g,可选 10,20,40,80 , 其他数字
|
|||||||
}
|
}
|
||||||
$.validate = '';
|
$.validate = '';
|
||||||
$.validate = await Slider.injectToRequest()
|
$.validate = await Slider.injectToRequest()
|
||||||
|
if (!$.validate) {console.log('滑块验证失败过多,跳出');continue};
|
||||||
await feedPets(FEED_NUM);//喂食
|
await feedPets(FEED_NUM);//喂食
|
||||||
//await ThreeMeals();//三餐
|
//await ThreeMeals();//三餐
|
||||||
await showMsg();
|
await showMsg();
|
||||||
|
Loading…
Reference in New Issue
Block a user