diff options
Diffstat (limited to 'python/download_markit_quotes.py')
| -rw-r--r-- | python/download_markit_quotes.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python/download_markit_quotes.py b/python/download_markit_quotes.py index 0a64c14b..975b5772 100644 --- a/python/download_markit_quotes.py +++ b/python/download_markit_quotes.py @@ -7,7 +7,7 @@ from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait from selenium.common.exceptions import TimeoutException -import time, os +import time, os, shutil from config import markit_login, markit_password from insert_tranche_quotes import insert_quotes import logging @@ -17,6 +17,7 @@ logging.basicConfig(filename='/home/share/CorpCDOs/logs/download_tranche_quotes. level=logging.INFO, format='%(asctime)s %(message)s') +##profile was created as so: firefox -CreateProfile "Selenium /home/guillaume/ffprofile" profile = FirefoxProfile() profile.set_preference('browser.download.folderList', 2) # custom location profile.set_preference('browser.download.manager.showWhenStarting', False) @@ -48,6 +49,7 @@ try: except TimeoutException: logging.info("timeout before being able to click") driver.close() + shutil.rmtree(profile.profile_dir) sys.exit() total_wait = 0 @@ -61,3 +63,4 @@ else: insert_quotes(quote_dir="/tmp") driver.close() +shutil.rmtree(profile.profile_dir) |
