Skip to content

Commit d2782fe

Browse files
MatthewZMSUMatthewYatskov
authored
Extra Browser Args (#70)
* Bump pptr version * Extra Args * delete print * Move argument to start_container.sh and to docker --------- Co-authored-by: Matthew <[email protected]> Co-authored-by: Alexander <[email protected]>
1 parent 3b91fb5 commit d2782fe

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ Here we list them all with their purpose.
344344
* `CONTEXT_TIMEOUT = 600000` - time (in ms) after the passage of which the context would close
345345
* `PROMETHEUS_HOST = undefined` - host address of the metrics endpoint, if not defined then assigns to "localhost"
346346
* `PROMETHEUS_PORT = undefined` - port of address of the metrics endpoint, if not defined then assigns to "9464"
347+
* `BROWSER_EXTRA_ARGS = undefined` - extra arguments to browser. Applicable only to docker container. If you want to provide extra browser arguments via console just put them after `yarn run`.
347348

348349
## Notes on memory usage
349350

app.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ async function setupBrowser() {
8989
timeout: CONNECT_TIMEOUT,
9090
args: [
9191
"--no-sandbox",
92+
...process.argv.slice(2),
9293
]
9394
}
9495
);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "scrapy-puppeteer-service",
3-
"version": "0.4.2",
3+
"version": "0.4.3",
44
"private": true,
55
"scripts": {
66
"start": "node ./bin/www"

start_container.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ if [ "${HEADLESS}" == "false" ]; then
88
fi
99

1010
# Start scrapy-puppeteer-service
11-
yarn start
11+
yarn start ${BROWSER_EXTRA_ARGS}
1212

1313
# Wait for any process to exit
1414
wait -n

0 commit comments

Comments
 (0)