Change headless mode?
Hello - i am currently running the actor locally in VSCode in python -
How and where can i change if the Actor is running headless or not
with this "Actor.config.headless" parameter
Where can i change this to False for example?
3 Replies
@RapidTech1898 just advanced to level 2! Thanks for your contributions! 🎉
Hi there!
The headless option is tied to the APIFY_HEADLESS variable (set to "1" or "0").
1 = headless
0 = headful
You have two ways to turn off headless mode:
Set the environment variable before running your actor:
Override the configuration in code, as long as you do it before any browser is launched:
Hope this helps!
Hello - thanks for the response -
I tried it with this:
Configuration.get_global_configuration().headless = False
print(Actor.config.headless)
But the result is still:
(apify) C:\DEVNEU\Python-Diverses\Apify_Development\leadSearch>apify run -p
Run: "C:\DEVNEU.venv\apify\Scripts\python.exe" -m src
True