aboutsummaryrefslogtreecommitdiff
path: root/src/web/crawler.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-01-07 07:48:55 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-01-07 07:48:55 +0100
commit1ceca05e54b0fe02b1b45a595066e6d6af877db8 (patch)
tree38463ee005bb13f47d0e277c263b18a69de00432 /src/web/crawler.py
parentit seemms that alembic do not find the models (diff)
downloadnewspipe-1ceca05e54b0fe02b1b45a595066e6d6af877db8.tar.gz
newspipe-1ceca05e54b0fe02b1b45a595066e6d6af877db8.tar.bz2
newspipe-1ceca05e54b0fe02b1b45a595066e6d6af877db8.zip
If the character encoding can not be determined, Universal Feed Parser sets the bozo bit to 1 and sets bozo_exception to feedparser.CharacterEncodingUnknown. In this case, parsed values will be strings, not Unicode strings. This is not a problem for us.
Diffstat (limited to 'src/web/crawler.py')
-rw-r--r--src/web/crawler.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/web/crawler.py b/src/web/crawler.py
index ad27fd4b..22e73754 100644
--- a/src/web/crawler.py
+++ b/src/web/crawler.py
@@ -87,7 +87,7 @@ async def parse_feed(user, feed):
FeedController().update({'id': feed.id}, up_feed)
return
- if parsed_feed['bozo'] == 1:
+ if parsed_feed['bozo'] == 1 and parsed_feed['entries'] == []:
up_feed['last_error'] = str(parsed_feed['bozo_exception'])
up_feed['error_count'] = feed.error_count + 1
FeedController().update({'id': feed.id}, up_feed)
bgstack15