ulixee / secret-agent

The web scraper that's nearly impossible to block - now called @ulixee/hero
https://secretagent.dev
MIT License
670 stars 44 forks source link

Having trouble figuring out how to prevent dev tools from opening on launch #294

Closed akavenus closed 3 years ago

akavenus commented 3 years ago

Hello, I'm having some trouble figuring out how to prevent dev tools from opening on launch

image

When launch of the browser, dev tools is open. How would I make sure its closed on launch?

blakebyrnes commented 3 years ago

@akavenus we're working on improving the headed use of SecretAgent right now, so this is not the longterm solution, but there's an environment variable that will disable it: SA_DISABLE_DEVTOOLS=1

akavenus commented 3 years ago

Where would I place this in my code? It didn't work for me but the placement of it was probably wrong

akavenus commented 3 years ago

This worked, thank you

nlile commented 3 years ago

Where would I place this in my code? It didn't work for me but the placement of it was probably wrong

process.env.SA_DISABLE_DEVTOOLS = 1;

blakebyrnes commented 3 years ago

@nlile - Either first thing in your script, or command line (before secret agent is loaded)