diff options
Diffstat (limited to 'python/download_emails.py')
| -rw-r--r-- | python/download_emails.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/python/download_emails.py b/python/download_emails.py index 9072f4ec..cf738e9e 100644 --- a/python/download_emails.py +++ b/python/download_emails.py @@ -43,11 +43,12 @@ def save_emails(update=True): existing_msgs = set(str(x).split("_")[1] for x in p.iterdir() if x.is_file()) last_history_id = None - for msg in GmailMessage.list_msg_ids('swaptions', last_history_id): + gm = GmailMessage() + for msg in gm.list_msg_ids('swaptions', last_history_id): if msg['id'] in existing_msgs: continue try: - message = GmailMessage.from_id(msg['id']) + message = gm.from_id(msg['id']) logging.info(message.history_id) subject = message['subject'] date = parsedate_to_datetime(message['date']) |
