From 9d33ca744aa6dffe9e16fc1423423077acdda94a Mon Sep 17 00:00:00 2001 From: profitroll Date: Fri, 14 Jul 2023 12:07:06 +0200 Subject: [PATCH] Added executable path --- .gitignore | 4 +++- PageSaver/pageSaver.js | 5 +++-- modules/bwt.py | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index ba0db18..597e846 100644 --- a/.gitignore +++ b/.gitignore @@ -159,8 +159,10 @@ config.json *.session *.session-journal +.venv venv venv_linux venv_windows -PageSaver/node_modules \ No newline at end of file +PageSaver/node_modules +bin/ \ No newline at end of file diff --git a/PageSaver/pageSaver.js b/PageSaver/pageSaver.js index e2f945f..3794373 100644 --- a/PageSaver/pageSaver.js +++ b/PageSaver/pageSaver.js @@ -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(); diff --git a/modules/bwt.py b/modules/bwt.py index 364a0db..be3d377 100644 --- a/modules/bwt.py +++ b/modules/bwt.py @@ -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")