aboutsummaryrefslogtreecommitdiffstats
path: root/python/quote_parsing/download_emails.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/quote_parsing/download_emails.py')
-rw-r--r--python/quote_parsing/download_emails.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/python/quote_parsing/download_emails.py b/python/quote_parsing/download_emails.py
index c27097e8..ed4aa446 100644
--- a/python/quote_parsing/download_emails.py
+++ b/python/quote_parsing/download_emails.py
@@ -1,16 +1,12 @@
-import base64
-import json
-import os
-import sys
import unicodedata
from . import logger
-from apiclient import errors
from bs4 import BeautifulSoup, NavigableString, Tag
-from pathlib import Path
+
from pytz import timezone
-from gmail_helpers import GmailMessage
from email.utils import parsedate_to_datetime
+from serenitas.utils.env import DATA_DIR
+from serenitas.utils.gmail import GmailMessage
def print_citi_html2(soup):
@@ -43,7 +39,6 @@ def print_citi_html(email):
def save_emails(update=True):
"""Download new emails that were labeled swaptions."""
- DATA_DIR = Path(os.getenv("DATA_DIR"))
if update:
last_history_id = int((DATA_DIR / ".lastHistoryId").read_text())