more fields
This commit is contained in:
@@ -18,6 +18,8 @@ class RequestDataPojo {
|
||||
ua
|
||||
dvm
|
||||
acw
|
||||
pr
|
||||
ts_mtp
|
||||
cookiesStr
|
||||
|
||||
constructor(glvd,
|
||||
@@ -35,7 +37,7 @@ class RequestDataPojo {
|
||||
plg,
|
||||
eva,
|
||||
vnd,
|
||||
plu, ua, dvm, acw) {
|
||||
plu, ua, dvm, acw, pr, ts_mtp) {
|
||||
this.glvd = glvd
|
||||
this.glrd = glrd
|
||||
this.hc = hc
|
||||
@@ -55,7 +57,8 @@ class RequestDataPojo {
|
||||
this.ua = ua
|
||||
this.dvm = dvm
|
||||
this.acw = acw
|
||||
|
||||
this.pr = pr
|
||||
this.ts_mtp = ts_mtp
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ const OCRChecker = require("./OCRChecker");
|
||||
const {exec} = require("child_process");
|
||||
const {openUrlWithAdb} = require("../utiles/CmdUtils");
|
||||
const RequestDataPojo = require("../models/RequestDataPojo");
|
||||
const {REQUEST_DATA_OBJECT} = require("../queue/Sender");
|
||||
const {REQUEST_DATA_OBJECT, TEST_QUEUE} = require("../queue/Sender");
|
||||
// const RDV_URL = "http://192.168.0.44:8000/test_appointment.html"
|
||||
const RDV_URL = "https://rendezvousparis.hermes.com/client/register";
|
||||
const BLANK_URL = "about:blank"
|
||||
@@ -76,7 +76,7 @@ function logWithDevice(message, device) {
|
||||
const searchTexts = ['hermes+rdv+online+paris', 'hermes+rdv+enligne+paris', 'hermes+rdv+en+ligne+paris', 'hermes+rendezvous+en+ligne+paris', 'hermes+appointment+online+paris', 'hermes+appointment+online+paris', 'appointment+hermes+paris+on+line', 'hermes+rendez+vous+online+paris', 'hermes+rendez+vous+paris+en+ligne', 'hermes+rendez+vous+paris+enligne', 'hermes+rendez+vous+paris+online', 'online+appointment+hermes+paris', 'hermes+online+appointment+paris', 'paris+hermes+online+appointment']
|
||||
|
||||
class CommandorPage {
|
||||
constructor(contact, device, sender, mongoManager, selectedStore = DEFAULT_STORE, audioAnalyse = false, alertBeep = false, port = 9000, onlyForCookies = true) {
|
||||
constructor(contact, device, sender, mongoManager, selectedStore = DEFAULT_STORE, audioAnalyse = false, alertBeep = false, port = 9000, onlyForCookies = false) {
|
||||
this.contact = contact;
|
||||
this.device = device;
|
||||
this.mongoManager = mongoManager;
|
||||
@@ -1178,7 +1178,7 @@ class CommandorPage {
|
||||
plg,
|
||||
eva,
|
||||
vnd,
|
||||
plu, ua, dvm, acw
|
||||
plu, ua, dvm, acw, pr, ts_mtp
|
||||
} = await this.page.evaluate(() => {
|
||||
let webglContext = document.createElement('canvas').getContext("webgl")
|
||||
let webglDebugRenderInfo = webglContext.getExtension("WEBGL_debug_renderer_info")
|
||||
@@ -1217,6 +1217,8 @@ class CommandorPage {
|
||||
let audio = document['createElement']("audio")
|
||||
|
||||
let acw = audio.canPlayType(('audio/wav; codecs="1"'))
|
||||
let pr = window['devicePixelRatio']
|
||||
let ts_mtp = navigator.maxTouchPoints || navigator.msMaxTouchPoints || 0;
|
||||
return {
|
||||
glvd,
|
||||
glrd,
|
||||
@@ -1235,7 +1237,7 @@ class CommandorPage {
|
||||
vnd,
|
||||
plu,
|
||||
ua,
|
||||
dvm, acw
|
||||
dvm, acw, pr, ts_mtp
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1258,7 +1260,9 @@ class CommandorPage {
|
||||
logWithDevice("ua:" + ua, this.device)
|
||||
logWithDevice("dvm:" + dvm, this.device)
|
||||
logWithDevice("acw:" + acw, this.device)
|
||||
return new RequestDataPojo(glvd, glrd, hc, br_oh, br_ow, br_h, br_w, rs_h, rs_w, rs_cd, ars_h, ars_w, plg, eva, vnd, plu, ua, dvm, acw)
|
||||
logWithDevice("pr:" + pr, this.device)
|
||||
logWithDevice("ts_mtp:" + ts_mtp, this.device)
|
||||
return new RequestDataPojo(glvd, glrd, hc, br_oh, br_ow, br_h, br_w, rs_h, rs_w, rs_cd, ars_h, ars_w, plg, eva, vnd, plu, ua, dvm, acw, pr, ts_mtp)
|
||||
}
|
||||
|
||||
|
||||
@@ -1273,7 +1277,8 @@ class CommandorPage {
|
||||
if (this.onlyForCookies) {
|
||||
let pojoToSend = await this.getRequestData()
|
||||
pojoToSend.cookiesStr = cookiesString
|
||||
this.sender.sendMessage(JSON.stringify(pojoToSend), REQUEST_DATA_OBJECT)
|
||||
// this.sender.sendMessage(JSON.stringify(pojoToSend), REQUEST_DATA_OBJECT)
|
||||
this.sender.sendMessage(JSON.stringify(pojoToSend), TEST_QUEUE)
|
||||
} else
|
||||
this.sender.sendMessage(cookiesString)
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user