aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2015-01-21 22:08:22 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2015-01-21 22:08:22 +0100
commit2fc73dddd00a978dd64d53e83572b5f6e65b2e09 (patch)
treef02a6f9245c561bf78b45908c2f46daea4f16fea /pyaggr3g470r
parentclean_url is now working with Python3 (diff)
downloadnewspipe-2fc73dddd00a978dd64d53e83572b5f6e65b2e09.tar.gz
newspipe-2fc73dddd00a978dd64d53e83572b5f6e65b2e09.tar.bz2
newspipe-2fc73dddd00a978dd64d53e83572b5f6e65b2e09.zip
Test if we effectively have retrieved some articles.
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r--pyaggr3g470r/crawler.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pyaggr3g470r/crawler.py b/pyaggr3g470r/crawler.py
index 42430b5e..e6daecd4 100644
--- a/pyaggr3g470r/crawler.py
+++ b/pyaggr3g470r/crawler.py
@@ -144,6 +144,8 @@ def fetch(user, feed):
def insert_database(user, feed):
articles = yield from asyncio.async(fetch(user, feed))
+ if None is articles:
+ return []
print('inserting articles for {}'.format(feed.title))
bgstack15