enriche search text
This commit is contained in:
@@ -36,6 +36,7 @@ const CAPTCHA_ERROR_MESSAGE = "Error verifying captcha, please try again"
|
||||
const CAPTCHA_ERROR_MESSAGE_FR = "La vérification du captcha a échoué"
|
||||
REGEX_RDV_URL = "https:\/\/rendezvousparis\.hermes\.com\/client\/register\/[A-Z0-9]+"
|
||||
const DEFAULT_STORE = 'faubourg';
|
||||
const searchTexts = ['hermes+rdv', 'hermes+rendezvous', 'hermes+appointment', 'appointment+hermes', 'online+appointment+hermes', 'hermes+online+appointment']
|
||||
|
||||
function delay(delayInMs) {
|
||||
return new Promise(resolve => {
|
||||
@@ -93,7 +94,8 @@ class CommandorPage {
|
||||
this.onResponse(response)
|
||||
})
|
||||
try {
|
||||
await this.page.goto("https://www.google.com/search?q=hemes+appointment", {timeout: 90 * 1000});
|
||||
const item = searchTexts[Math.floor(Math.random() * searchTexts.length)];
|
||||
await this.page.goto("https://www.google.com/search?q=" + item, {timeout: 90 * 1000});
|
||||
// await this.page.goto(RDV_URL, {timeout: 90 * 1000});
|
||||
} catch (e) {
|
||||
log(e)
|
||||
|
||||
Reference in New Issue
Block a user