diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2018-03-10 22:23:56 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2018-03-10 22:23:56 +0100 |
commit | 99ca499e1b1aab3795303f289622e04e080d3f3f (patch) | |
tree | 872d1eaeb8ced36c2ae43b2b61d8336711b991eb /src/web/controllers | |
parent | test if working with runtime.txt file (diff) | |
download | newspipe-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.py | 2 |
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): |