aboutsummaryrefslogtreecommitdiff
path: root/src/web/controllers
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2018-03-10 22:23:56 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2018-03-10 22:23:56 +0100
commit99ca499e1b1aab3795303f289622e04e080d3f3f (patch)
tree872d1eaeb8ced36c2ae43b2b61d8336711b991eb /src/web/controllers
parenttest if working with runtime.txt file (diff)
downloadnewspipe-99ca499e1b1aab3795303f289622e04e080d3f3f.tar.gz
newspipe-99ca499e1b1aab3795303f289622e04e080d3f3f.tar.bz2
newspipe-99ca499e1b1aab3795303f289622e04e080d3f3f.zip
Limit the search for duplicates to 1000 articles.
Diffstat (limited to 'src/web/controllers')
-rw-r--r--src/web/controllers/feed.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/web/controllers/feed.py b/src/web/controllers/feed.py
index a77fd926..d75cd994 100644
--- a/src/web/controllers/feed.py
+++ b/src/web/controllers/feed.py
@@ -41,7 +41,7 @@ class FeedController(AbstractController):
"""
feed = self.get(id=feed_id)
duplicates = []
- for pair in itertools.combinations(feed.articles, 2):
+ for pair in itertools.combinations(feed.articles[:1000], 2):
date1, date2 = pair[0].date, pair[1].date
if clear_string(pair[0].title) == clear_string(pair[1].title) \
and (date1 - date2) < timedelta(days=1):
bgstack15