Add options.json
This commit is contained in:
parent
7ef3b56f78
commit
88129ca20d
3
options.json
Normal file
3
options.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"uberPhoneNumber": "4444567891"
|
||||
}
|
@ -1,11 +1,12 @@
|
||||
import puppeteer from "puppeteer-core"
|
||||
import * as utils from "./utils.js"
|
||||
import fs from "fs"
|
||||
|
||||
function sleep(ms) {
|
||||
return new Promise((resolve) => setTimeout(resolve, ms))
|
||||
}
|
||||
|
||||
async function main() {
|
||||
let options = JSON.parse(fs.readFileSync("./options.json", "utf8"))
|
||||
const browser = await puppeteer.launch({
|
||||
headless: false,
|
||||
ignoreHTTPSErrors: true,
|
||||
@ -50,7 +51,10 @@ async function main() {
|
||||
console.log("Went to Page")
|
||||
|
||||
await page.waitForSelector(`input[id="PHONE_NUMBER_or_EMAIL_ADDRESS"]`)
|
||||
await page.type(`input[id="PHONE_NUMBER_or_EMAIL_ADDRESS"]`, "1234567891")
|
||||
await page.type(
|
||||
`input[id="PHONE_NUMBER_or_EMAIL_ADDRESS"]`,
|
||||
options.uberPhoneNumber ?? "",
|
||||
)
|
||||
|
||||
for (let i = 0; i < 100; i++) {
|
||||
await sleep(500)
|
||||
|
Loading…
Reference in New Issue
Block a user