how to open chrome in incognito mode from Python

Python Script to open incognito mode in chrome using webbrowser

import webbrowser
url="www.google.com"
chrome_path="C:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s --incognito"
webbrowser.get(chrome_path).open_new(url)

Leave a Comment