-1

I can not seem to find any documentation on how to open Opera in incognito mode

Could anyone help me with this please?

this is the part of code i need to include to open opera , but i have no idea how to inlcude the incognito mode

`import os
 import webbrowser


os.startfile(C:\\Program Files\\Opera\\launcher.exe)
webbrowser.open`

1 Answers1

0

Use os or subprocess to run the opera luncher with argument --private

somthing like this:

"C:\<path to opera folder>\Opera\launcher.exe" --private

Full code:

import subprocess


command = r'"C:\<path to opera folder>\Opera\launcher.exe" --private'
subprocess.Popen(command)
infantry
  • 336
  • 1
  • 5
  • 15
  • I tried this part of code ` import os os.startfile(directory) -- private ` but did not work for me , im doing in pycharm – Vojta Ličko Jan 29 '20 at 19:18