Merge branch 'feature/mobile_with_close_pages' of bitbucket.org:panleicim/puppeteerjs into feature/mobile_with_close_pages
This commit is contained in:
@@ -715,10 +715,12 @@ class CommandorPage {
|
|||||||
let reserve = ReserveResultPojo.create_from_contact(this.contact, id, url, this.choosedStore, publishType);
|
let reserve = ReserveResultPojo.create_from_contact(this.contact, id, url, this.choosedStore, publishType);
|
||||||
reserve.source_from = this.device.model();
|
reserve.source_from = this.device.model();
|
||||||
await this.mongoManager.saveReserveToDb(reserve.to_mongo_dict())
|
await this.mongoManager.saveReserveToDb(reserve.to_mongo_dict())
|
||||||
try {
|
if (!this.page.isClosed()) {
|
||||||
await this.page.close();
|
try {
|
||||||
} catch (e) {
|
await this.page.close();
|
||||||
console.log(e)
|
} catch (e) {
|
||||||
|
console.log(e)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// await this.deleteFromBlackList()
|
// await this.deleteFromBlackList()
|
||||||
this.isTerminated = true
|
this.isTerminated = true
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ class OCRChecker {
|
|||||||
} else if (result.includes(SSL_CERT_ERROR)) {
|
} else if (result.includes(SSL_CERT_ERROR)) {
|
||||||
await this.deleteFile(fileName)
|
await this.deleteFile(fileName)
|
||||||
return OCRResult.SSL_CERT_ERROR
|
return OCRResult.SSL_CERT_ERROR
|
||||||
} else if (result.includes(MESSAGE_FILL_FIELD_FR) || result.includes(MESSAGE_FILL_FIELD_FR_2) || result.includes(MESSAGE_FILL_FIELD_FR_3) || result.includes(MESSAGE_FILL_FIELD_FR_4) || result.includes(MESSAGE_FILL_FIELD_FR_5)||result.includes(MESSAGE_FILL_FIELD_FR_6)) {
|
} else if (result.includes(MESSAGE_FILL_FIELD_FR) || result.includes(MESSAGE_FILL_FIELD_FR_2) || result.includes(MESSAGE_FILL_FIELD_FR_3) || result.includes(MESSAGE_FILL_FIELD_FR_4) || result.includes(MESSAGE_FILL_FIELD_FR_5) || result.includes(MESSAGE_FILL_FIELD_FR_6)) {
|
||||||
await this.deleteFile(fileName)
|
await this.deleteFile(fileName)
|
||||||
return OCRResult.FILL_FIELD
|
return OCRResult.FILL_FIELD
|
||||||
} else if (result.includes(CAPTCHA_ERROR_MESSAGE) || result.includes(CAPTCHA_ERROR_MESSAGE_FR)) {
|
} else if (result.includes(CAPTCHA_ERROR_MESSAGE) || result.includes(CAPTCHA_ERROR_MESSAGE_FR)) {
|
||||||
@@ -118,7 +118,7 @@ class OCRChecker {
|
|||||||
await this.deleteFile(fileName)
|
await this.deleteFile(fileName)
|
||||||
return OCRResult.BLOCKED
|
return OCRResult.BLOCKED
|
||||||
} else if (result.includes(ERR_CACHE_MISS) || result.includes(ERR_CACHE_MISS_2) || result.includes(ERR_CACHE_MISS_3)
|
} else if (result.includes(ERR_CACHE_MISS) || result.includes(ERR_CACHE_MISS_2) || result.includes(ERR_CACHE_MISS_3)
|
||||||
|| result.includes(ERR_CACHE_MISS_4) || result.includes(ERR_EMPTY_RESPONSE) ) { //|| result.includes(ERR_SSL_PROTOCOL)
|
|| result.includes(ERR_CACHE_MISS_4) || result.includes(ERR_EMPTY_RESPONSE)) { //|| result.includes(ERR_SSL_PROTOCOL)
|
||||||
await this.deleteFile(fileName)
|
await this.deleteFile(fileName)
|
||||||
return OCRResult.TO_REFRESH
|
return OCRResult.TO_REFRESH
|
||||||
} else if (result.includes(CHECKING_MSG_FR) || result.includes(CHECKING_MSG_FR_2)) {
|
} else if (result.includes(CHECKING_MSG_FR) || result.includes(CHECKING_MSG_FR_2)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user