profile.set_preference('browser.helperApps.neverAsk.saveToDisk',
    'application/x-gzip')
driver = webdriver.Firefox(firefox_profile=profile)
Downloading file to specified location with Selenium and python