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
|
||||||
*.session-journal
|
*.session-journal
|
||||||
|
|
||||||
|
.venv
|
||||||
venv
|
venv
|
||||||
venv_linux
|
venv_linux
|
||||||
venv_windows
|
venv_windows
|
||||||
|
|
||||||
PageSaver/node_modules
|
PageSaver/node_modules
|
||||||
|
bin/
|
@ -6,11 +6,12 @@ const userAgent = require('user-agents');
|
|||||||
(async () => {
|
(async () => {
|
||||||
|
|
||||||
const url = process.argv[2];
|
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();
|
const page = await browser.newPage();
|
||||||
await page.setUserAgent(userAgent.random().toString());
|
await page.setUserAgent(userAgent.random().toString());
|
||||||
|
|
||||||
await page.goto(url, {waitUntil: 'load'});
|
await page.goto(url, { waitUntil: 'load' });
|
||||||
|
|
||||||
const html = await page.content();
|
const html = await page.content();
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@ async def getWaterLeft(cardid, filename, app=None):
|
|||||||
[
|
[
|
||||||
"PageSaver/pageSaver",
|
"PageSaver/pageSaver",
|
||||||
f"https://bwtaqua.com.ua/card-topup/?id={cardid}",
|
f"https://bwtaqua.com.ua/card-topup/?id={cardid}",
|
||||||
|
"./bin/chrome",
|
||||||
]
|
]
|
||||||
) # , ">", f"data/pages/{str(filename)}.html"])
|
) # , ">", f"data/pages/{str(filename)}.html"])
|
||||||
html_file = proc.decode("utf-8")
|
html_file = proc.decode("utf-8")
|
||||||
@ -41,6 +42,7 @@ async def getWaterLeft(cardid, filename, app=None):
|
|||||||
"node",
|
"node",
|
||||||
"./PageSaver/pageSaver.js",
|
"./PageSaver/pageSaver.js",
|
||||||
f"https://bwtaqua.com.ua/card-topup/?id={cardid}",
|
f"https://bwtaqua.com.ua/card-topup/?id={cardid}",
|
||||||
|
"./bin/chrome",
|
||||||
]
|
]
|
||||||
) # , ">", f"data/pages/{str(filename)}.html"])
|
) # , ">", f"data/pages/{str(filename)}.html"])
|
||||||
html_file = proc.decode("utf-8")
|
html_file = proc.decode("utf-8")
|
||||||
|
Reference in New Issue
Block a user