aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2015-07-06 07:09:31 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2015-07-06 07:09:31 +0200
commit02614a640131fcb53c3d7000dc0e21189e9a5ba0 (patch)
treed0115e315f135d339bf1eb910e9c0ea8398e04af
parentMerged in jaesivsm/pyaggr3g470r (pull request #15) (diff)
downloadnewspipe-02614a640131fcb53c3d7000dc0e21189e9a5ba0.tar.gz
newspipe-02614a640131fcb53c3d7000dc0e21189e9a5ba0.tar.bz2
newspipe-02614a640131fcb53c3d7000dc0e21189e9a5ba0.zip
Updated the classic crawler to use the new icon feature.
-rw-r--r--pyaggr3g470r/crawler.py22
1 files changed, 12 insertions, 10 deletions
diff --git a/pyaggr3g470r/crawler.py b/pyaggr3g470r/crawler.py
index 6bf216f3..05139483 100644
--- a/pyaggr3g470r/crawler.py
+++ b/pyaggr3g470r/crawler.py
@@ -88,21 +88,23 @@ def parse_feed(user, feed):
feed.last_error = ""
# Feed informations
- if feed.title == "":
- try:
- feed.title = a_feed.feed.title
- except:
- feed.title = "No title"
+ try:
+ feed.title = a_feed.feed.title
+ except:
+ feed.title = "No title"
if feed.link == "":
try:
feed.link = a_feed.feed.link
except:
feed.link = ""
- if feed.description == "":
- try:
- feed.description = a_feed.feed.subtitle
- except:
- feed.description = ""
+ try:
+ feed.description = a_feed.feed.subtitle
+ except:
+ feed.description = ""
+ try:
+ feed.icon = a_feed.feed.image.href
+ except:
+ feed.icon = ""
db.session.commit()
articles = []
bgstack15