Added executable path
This commit is contained in:
parent
93096eb52b
commit
9d33ca744a
2
.gitignore
vendored
2
.gitignore
vendored
@ -159,8 +159,10 @@ config.json
|
||||
*.session
|
||||
*.session-journal
|
||||
|
||||
.venv
|
||||
venv
|
||||
venv_linux
|
||||
venv_windows
|
||||
|
||||
PageSaver/node_modules
|
||||
bin/
|
@ -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();
|
||||
|
||||
|
@ -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")
|
||||
|
Reference in New Issue
Block a user