From f739df494a1c912cf6a23d117723c9c2e93005de Mon Sep 17 00:00:00 2001 From: Jon Michael Aanes Date: Thu, 16 May 2024 00:03:10 +0200 Subject: [PATCH] Add reminder if email is not enabled --- README.md | 1 + personal_data/main.py | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5645362..474d178 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ python -m personal_data - [ ] YouTube (Music): Liked videos with title and URL. - [ ] Steam Wishlist and Achievements - [ ] fredagscafeen.dk +- [ ] [WaniKani](https://docs.api.wanikani.com) ## License diff --git a/personal_data/main.py b/personal_data/main.py index 53833bd..d00f3ba 100644 --- a/personal_data/main.py +++ b/personal_data/main.py @@ -230,7 +230,10 @@ def main( ) logger.info('Scraper done: %s', scraper.dataset_name) - if status['extended'] and send_email_notification: - send_notification(session, scraper_cls.__name__, status['dicts'][-1]) + if status['extended']: + if send_email_notification: + send_notification(session, scraper_cls.__name__, status['dicts'][-1]) + else: + logger.info('Email not enabled: Skipping notification') del scraper, session