From 736cdc8576066b110779e008e16aad28561136ef Mon Sep 17 00:00:00 2001 From: Jason Schwarzenberger Date: Tue, 3 Nov 2020 17:04:46 +1300 Subject: [PATCH] fix mistake. --- apiserver/feed.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apiserver/feed.py b/apiserver/feed.py index a18451f..62b782e 100644 --- a/apiserver/feed.py +++ b/apiserver/feed.py @@ -17,10 +17,10 @@ INVALID_DOMAINS = ['youtube.com', 'bloomberg.com', 'wsj.com'] TWO_DAYS = 60*60*24*2 substacks = {} -for key, value in settings.SUBSTACK.values(): +for key, value in settings.SUBSTACK.items(): substacks[key] = substack.Publication(value['url']) sitemaps = {} -for key, value in settings.SITEMAP.values(): +for key, value in settings.SITEMAP.items(): sitemaps[key] = sitemap.Sitemap(value['url']) def list(): @@ -37,11 +37,11 @@ def list(): if settings.NUM_SUBSTACK: feed += [(x, 'substack') for x in substack.top.feed()[:settings.NUM_SUBSTACK]] - for key, publication in substacks.values(): + for key, publication in substacks.items(): count = settings.SUBSTACK[key].count feed += [(x, key) for x in publication.feed()[:count]] - for key, sites in sitemaps.values(): + for key, sites in sitemaps.items(): count = settings.SITEMAP[key].count feed += [(x, key) for x in sites.feed()[:count]]