From 457b607ccd58cf995f0251d8e810d092bfdd763a Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Sun, 29 Mar 2020 23:20:57 +0200 Subject: improvements to the crawler --- newspipe/bootstrap.py | 1 - newspipe/crawler/default_crawler.py | 7 +++---- newspipe/templates/home.html | 1 + 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/newspipe/bootstrap.py b/newspipe/bootstrap.py index edaee746..2e084a55 100644 --- a/newspipe/bootstrap.py +++ b/newspipe/bootstrap.py @@ -24,7 +24,6 @@ def set_logging( "root", "bootstrap", "runserver", - "newspipe", "newspipe.crawler.default_crawler", "manager", "plugins", diff --git a/newspipe/crawler/default_crawler.py b/newspipe/crawler/default_crawler.py index d76ca4fa..60ced87e 100644 --- a/newspipe/crawler/default_crawler.py +++ b/newspipe/crawler/default_crawler.py @@ -178,10 +178,9 @@ async def retrieve_feed(queue, users, feed_id=None): continue if feed.last_retrieved > (datetime.now() - timedelta(minutes=application.config["FEED_REFRESH_INTERVAL"])): continue - feeds.append(feed) - if feed_id and feed_id == feed.id: - break - + if None is feed_id or (feed_id and feed_id == feed.id): + feeds.append(feed) + logger.info(feeds) if feeds == []: logger.info("No feed to retrieve for {}".format(user.nickname)) diff --git a/newspipe/templates/home.html b/newspipe/templates/home.html index 74180bc9..3ecc0aab 100644 --- a/newspipe/templates/home.html +++ b/newspipe/templates/home.html @@ -132,6 +132,7 @@ {% endif %} + {{ article.title | safe }} {{ article.date | datetime(format='short') }} -- cgit