diff options
author | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-11-03 23:50:58 +0100 |
---|---|---|
committer | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-11-03 23:50:58 +0100 |
commit | 76fbb07dc3d296e3f545e8135393b94afcb8f01d (patch) | |
tree | 02cdc30a441a42fe8b7558b5ff28547012b03371 | |
parent | Updated README. (diff) | |
download | newspipe-76fbb07dc3d296e3f545e8135393b94afcb8f01d.tar.gz newspipe-76fbb07dc3d296e3f545e8135393b94afcb8f01d.tar.bz2 newspipe-76fbb07dc3d296e3f545e8135393b94afcb8f01d.zip |
Try to speed the search of article.
-rw-r--r-- | pyaggr3g470r/feedgetter.py | 2 | ||||
-rw-r--r-- | pyaggr3g470r/models.py | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/pyaggr3g470r/feedgetter.py b/pyaggr3g470r/feedgetter.py index 2b0c08f9..53e57fa7 100644 --- a/pyaggr3g470r/feedgetter.py +++ b/pyaggr3g470r/feedgetter.py @@ -88,7 +88,7 @@ class FeedGetter(object): articles = [] for article in a_feed['entries']: - if article.link in [farticle.link for farticle in feed.articles]: + if article.link in feed.articles: continue description = "" diff --git a/pyaggr3g470r/models.py b/pyaggr3g470r/models.py index 90801edc..de360697 100644 --- a/pyaggr3g470r/models.py +++ b/pyaggr3g470r/models.py @@ -66,6 +66,9 @@ class Article(Document): ] } + def __eq__(self, other): + return self.link == other + def __str__(self): return 'Article: %s' % self.title |