Merge branch 'feature/brave_v1_65_133' of bitbucket.org:panleicim/puppeteerjs into feature/brave_v1_65_133

This commit is contained in:
2024-09-20 20:39:36 +02:00
5 changed files with 16 additions and 8 deletions
+3
View File
@@ -0,0 +1,3 @@
node_modules
.idea
*.png
+4 -1
View File
@@ -1,9 +1,12 @@
const {startBookWithNumbers, scheduleBookWithNumbers} = require('./src/appointment') const {startBookWithNumbers, scheduleBookWithNumbers} = require('./src/appointment')
const schedule = require("node-schedule"); const schedule = require("node-schedule");
const {homedir} = require("os");
homeDir = homedir()
//faubourg, random //faubourg, random
schedule.scheduleJob('30 10 * * *', function () { schedule.scheduleJob('30 10 * * *', function () {
console.log("start startBookWithNumbers") console.log("start startBookWithNumbers")
startBookWithNumbers(1, 6000, "random", "/Users/panlei/Desktop/03_05_to_test.xlsx", true, false).then((r) => { startBookWithNumbers(1, 6000, "random", homedir() + "/Desktop/contact_list_2024-09-11.xlsx", true, false).then((r) => {
console.log(r) console.log(r)
}) })
}) })
+1 -1
View File
@@ -14,7 +14,7 @@ let excelUtil = new ExcelUtil();
let collectionName = formatDate(new Date()) let collectionName = formatDate(new Date())
let excludeMode = DeviceExcludeMode.ZERO let excludeMode = DeviceExcludeMode.ZERO
let three_to_excludes = ["e30eb015"] let three_to_excludes = []
let four_to_excludes = ["bec11752", "4e8ca027", "hi7ljr5xduyt9pfi", "EPHUT20825001518"] let four_to_excludes = ["bec11752", "4e8ca027", "hi7ljr5xduyt9pfi", "EPHUT20825001518"]
let seven_to_excludes = ["4e8ca027", "hi7ljr5xduyt9pfi", "EPHUT20825001518", "bec11752", "fuljaueqguugf6pn", "EPHUT20825001518"] let seven_to_excludes = ["4e8ca027", "hi7ljr5xduyt9pfi", "EPHUT20825001518", "bec11752", "fuljaueqguugf6pn", "EPHUT20825001518"]
let six_to_excludes = ["4e8ca027", "hi7ljr5xduyt9pfi", "EPHUT20825001518", "bec11752", "07fbd156", "NFD669QK8XNFSCNN", "6X494TTWQGFALB79", "71a0371d", "YP6HVKLFE67T598L"] let six_to_excludes = ["4e8ca027", "hi7ljr5xduyt9pfi", "EPHUT20825001518", "bec11752", "07fbd156", "NFD669QK8XNFSCNN", "6X494TTWQGFALB79", "71a0371d", "YP6HVKLFE67T598L"]
+6 -3
View File
@@ -875,6 +875,7 @@ class CommandorPage {
logWithDevice("will recheck OCR", this.device) logWithDevice("will recheck OCR", this.device)
checkResult = await this.ocrChecker.get_result(); checkResult = await this.ocrChecker.get_result();
} }
while (checkResult === OCRResult.SLIDING_CAPTCHA) { while (checkResult === OCRResult.SLIDING_CAPTCHA) {
logWithDevice("will call this.slidingCaptcha()", this.device) logWithDevice("will call this.slidingCaptcha()", this.device)
await this.slidingCaptcha(async (isSuccessful) => { await this.slidingCaptcha(async (isSuccessful) => {
@@ -882,8 +883,8 @@ class CommandorPage {
console.log(checkResult); console.log(checkResult);
if (isSuccessful) { if (isSuccessful) {
await delay(5 * 1000) await delay(5 * 1000)
// checkResult = await this.ocrChecker.get_result(); checkResult = await this.ocrChecker.get_result();
await this.checkResultWithOcr() // await this.checkResultWithOcr()
} else { } else {
if (checkResult === OCRResult.SLIDING_CAPTCHA) { if (checkResult === OCRResult.SLIDING_CAPTCHA) {
checkResult = OCRResult.TERMINAED checkResult = OCRResult.TERMINAED
@@ -1025,9 +1026,11 @@ class CommandorPage {
await this.tapForDevice(this.device, 360, 820) await this.tapForDevice(this.device, 360, 820)
} else if (this.device.model() === "M2006C3LG" || this.device.model() === "220233L2G") { } else if (this.device.model() === "M2006C3LG" || this.device.model() === "220233L2G") {
await this.tapForDevice(this.device, 350, 777) await this.tapForDevice(this.device, 350, 777)
} else if (this.device.model() === "KB2003" || this.device.model() === "DE2117") { } else if (this.device.model() === "KB2003") {
await this.tapForDevice(this.device, 500, 1200) await this.tapForDevice(this.device, 500, 1200)
await this.tapForDevice(this.device, 500, 1120) await this.tapForDevice(this.device, 500, 1120)
} else if (this.device.model() === "DE2117") {
await this.tapForDevice(this.device, 545, 1130)
} else } else
try { try {
await this.tapForDevice(this.device, 500, 1120) await this.tapForDevice(this.device, 500, 1120)
+2 -3
View File
@@ -2,7 +2,6 @@ const {startBookWithNumbers} = require('./src/appointment')
const {homedir} = require("os"); const {homedir} = require("os");
homeDir = homedir() homeDir = homedir()
//faubourg, random //faubourg, random
startBookWithNumbers(1, 10000, "random", homeDir + "/Desktop/contact_list_all.xlsx", true, false).then((r) => { startBookWithNumbers(0, 10000, "random", homeDir + "/Desktop/contact_list_2024-09-11.xlsx", true, false).then((r) => {
console.log(r) console.log(r)
}) })