from selenium import webdriver
firefox_profile = webdriver.FirefoxProfile()
firefox_profile.set_preference('browser.privatebrowsing.autostart', True)
driver = webdriver.Firefox(firefox_profile=firefox_profile)
Python - Start firefox with Selenium in private mode