diff options
Diffstat (limited to 'python/report_ops/scotia.py')
| -rw-r--r-- | python/report_ops/scotia.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/python/report_ops/scotia.py b/python/report_ops/scotia.py index 4e7a3b76..9d58c29a 100644 --- a/python/report_ops/scotia.py +++ b/python/report_ops/scotia.py @@ -21,8 +21,10 @@ def download_report(account_username, password, report_dir): login(driver, account_username, password) navigate_to_inbox(driver) attachment_element = get_attachment_element(driver) + attachment_element.click() fname = attachment_element.text.split()[0] driver.quit() + return fname def login(driver, account_username, password): @@ -78,5 +80,5 @@ def download_scotia_report(date): ) logger.info(f"{fname} already exists in {REPORT_DIR}") except StopIteration: # File doesn't exist, let's get it" - download_report(username, password, REPORT_DIR) - logger.info(f"Downloaded Scotia Report for {date}") + fname = download_report(username, password, REPORT_DIR) + logger.info(f"Downloaded Scotia Report for {date}: {fname}") |
