aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/duplicate.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2014-11-29 11:11:42 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2014-11-29 11:11:42 +0100
commit6e6f8360dc403bb50a305522a4fc3d665dab8f38 (patch)
tree5422845807892611b5636c6f5dea67c05fbe70a0 /pyaggr3g470r/duplicate.py
parentUpdated feeds.html template. (diff)
downloadnewspipe-6e6f8360dc403bb50a305522a4fc3d665dab8f38.tar.gz
newspipe-6e6f8360dc403bb50a305522a4fc3d665dab8f38.tar.bz2
newspipe-6e6f8360dc403bb50a305522a4fc3d665dab8f38.zip
Do not check at all the content.
Diffstat (limited to 'pyaggr3g470r/duplicate.py')
-rw-r--r--pyaggr3g470r/duplicate.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/pyaggr3g470r/duplicate.py b/pyaggr3g470r/duplicate.py
index 6f78fd81..f34e284e 100644
--- a/pyaggr3g470r/duplicate.py
+++ b/pyaggr3g470r/duplicate.py
@@ -1,12 +1,11 @@
#! /usr/bin/env python
#-*- coding: utf-8 -*-
+import itertools
from datetime import timedelta
-import itertools
import utils
-
def compare_documents(feed):
"""
Compare a list of documents by pair.
@@ -15,8 +14,7 @@ def compare_documents(feed):
for pair in itertools.combinations(feed.articles, 2):
date1 = pair[0].date
date2 = pair[1].date
- if pair[0].content != "" and \
- utils.clear_string(pair[0].title) == utils.clear_string(pair[1].title) and \
- (date1 - date2) < timedelta(days = 1):
+ if utils.clear_string(pair[0].title) == utils.clear_string(pair[1].title) and \
+ (date1 - date2) < timedelta(days = 1):
duplicates.append(pair)
return duplicates \ No newline at end of file
bgstack15