diff options
author | Matt Singleton <matt@xcolour.net> | 2017-10-22 21:28:28 -0400 |
---|---|---|
committer | Matt Singleton <matt@xcolour.net> | 2017-10-22 21:28:28 -0400 |
commit | f9b7022db9f66a7c72fb19a5c74ef9a25c04a6f0 (patch) | |
tree | 89f2fc73a28b5dd4c8775428b137c59117d952a5 | |
parent | 42cd31e0c3a7f7eced1da356c3411e68337aaad7 (diff) |
status logging message improvements
-rwxr-xr-x | unbiased/main.py | 1 | ||||
-rw-r--r-- | unbiased/sources/base.py | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/unbiased/main.py b/unbiased/main.py index cf478dc..d17799f 100755 --- a/unbiased/main.py +++ b/unbiased/main.py @@ -137,6 +137,7 @@ def run(webroot, source_names, web_log_stream, debug_mode=False): story.img, img_jpg = pullImage(story.img, img_idx, webroot, 150, 100) files_to_write[story.img] = img_jpg img_idx += 1 + logger.info('Downloaded images') # build the output file HTML output_html = buildOutput(top_stories, middle_stories, bottom_stories) diff --git a/unbiased/sources/base.py b/unbiased/sources/base.py index b5f2d1e..68211c5 100644 --- a/unbiased/sources/base.py +++ b/unbiased/sources/base.py @@ -50,13 +50,13 @@ class NewsSource(object): @classmethod def build(cls): h1s, h2s, h3s = cls._fetch_urls() - logger.info('Fetched {} h1s, {} h2s, {} h3s'.format(len(h1s), len(h2s), len(h3s))) h1s = tuple(cls._normalize_url(x) for x in h1s) h2s = tuple(cls._normalize_url(x) for x in h2s) h3s = tuple(cls._normalize_url(x) for x in h3s) h1s, h2s, h3s = cls._remove_duplicates(h1s, h2s, h3s) h1s, h2s, h3s = cls._fetch_articles(h1s, h2s, h3s) h1s, h2s, h3s = cls._remove_all_bad_stories(h1s, h2s, h3s) + logger.info('Fetched {} h1s, {} h2s, {} h3s'.format(len(h1s), len(h2s), len(h3s))) return cls(h1s, h2s, h3s) @classmethod |