diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-01-07 07:48:55 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-01-07 07:48:55 +0100 |
commit | 1ceca05e54b0fe02b1b45a595066e6d6af877db8 (patch) | |
tree | 38463ee005bb13f47d0e277c263b18a69de00432 | |
parent | it seemms that alembic do not find the models (diff) | |
download | newspipe-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.
-rw-r--r-- | src/web/crawler.py | 2 |
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) |