Added executable path

This commit is contained in:
Profitroll 2023-07-14 12:07:06 +02:00
parent 93096eb52b
commit 9d33ca744a
Signed by: profitroll
GPG Key ID: FA35CAB49DACD3B2
3 changed files with 8 additions and 3 deletions

2
.gitignore vendored
View File

@ -159,8 +159,10 @@ config.json
*.session
*.session-journal
.venv
venv
venv_linux
venv_windows
PageSaver/node_modules
bin/

View File

@ -6,11 +6,12 @@ const userAgent = require('user-agents');
(async () => {
const url = process.argv[2];
const browser = await puppeteer.launch();
const binary = argv[3];
const browser = await puppeteer.launch({ executablePath: binary });
const page = await browser.newPage();
await page.setUserAgent(userAgent.random().toString());
await page.goto(url, {waitUntil: 'load'});
await page.goto(url, { waitUntil: 'load' });
const html = await page.content();

View File

@ -32,6 +32,7 @@ async def getWaterLeft(cardid, filename, app=None):
[
"PageSaver/pageSaver",
f"https://bwtaqua.com.ua/card-topup/?id={cardid}",
"./bin/chrome",
]
) # , ">", f"data/pages/{str(filename)}.html"])
html_file = proc.decode("utf-8")
@ -41,6 +42,7 @@ async def getWaterLeft(cardid, filename, app=None):
"node",
"./PageSaver/pageSaver.js",
f"https://bwtaqua.com.ua/card-topup/?id={cardid}",
"./bin/chrome",
]
) # , ">", f"data/pages/{str(filename)}.html"])
html_file = proc.decode("utf-8")