Ho il seguente script:Python - avviare Firefox con selenio in privato
#!/usr/bin/python3
from selenium import webdriver
import time
def getProfile():
profile = webdriver.FirefoxProfile()
profile.set_preference("browser.privatebrowsing.autostart", True)
return profile
def main():
browser = webdriver.Firefox(firefox_profile=getProfile())
#browser shall call the URL
browser.get("http://www.google.com")
time.sleep(5)
browser.quit()
if __name__ == "__main__":
main()
Come posso gestire Firefox per avviare in privato?
@Louis Ho solo guardato le domande prima. Controllando le risposte, devo concordare con te che l'altra risposta è migliore. – cpburnz
Penso che la http://stackoverflow.com/questions/27630190/python-selenium-incognito-private-mode dovrebbe essere chiusa. – Nakilon