Last active
July 2, 2021 15:38
-
-
Save imjiten/7f15f08047cd9f7e8d1fc7ac6c97e0bc to your computer and use it in GitHub Desktop.
Open URL in browsers (Private Window/ Incognito Mode)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import webbrowser | |
| url = 'http://docs.python.org/' | |
| # MacOS Edge | |
| browser_path = 'open -na "Microsoft Edge Beta" --args --inprivate %s' | |
| # MacOS Chrome | |
| #browser_path = 'open -na "Google Chrome" --args --incognito %s' | |
| # MacOS FirefoxDeveloperEdition | |
| #browser_path = 'open -na "FirefoxDeveloperEdition" --args --private-window %s' | |
| webbrowser.get(browser_path).open(url) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment