aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2010-03-06 18:54:32 +0100
committercedricbonhomme <devnull@localhost>2010-03-06 18:54:32 +0100
commitf8996e9871afb1557d8b08f33fa7031baa049746 (patch)
tree478ae1ad21f900619fa02659b22f619ddcf6ce45
parentMinor improvement. Faster display of description page. (diff)
downloadnewspipe-f8996e9871afb1557d8b08f33fa7031baa049746.tar.gz
newspipe-f8996e9871afb1557d8b08f33fa7031baa049746.tar.bz2
newspipe-f8996e9871afb1557d8b08f33fa7031baa049746.zip
Remplaced sha256 by sha1.
-rw-r--r--feedgetter.py1
-rw-r--r--utils.py10
2 files changed, 5 insertions, 6 deletions
diff --git a/feedgetter.py b/feedgetter.py
index 432d603e..9df12080 100644
--- a/feedgetter.py
+++ b/feedgetter.py
@@ -11,7 +11,6 @@ __license__ = "GPLv3"
import re
import sqlite3
-import hashlib
import threading
import feedparser
diff --git a/utils.py b/utils.py
index c6bbcb0c..012f8bfc 100644
--- a/utils.py
+++ b/utils.py
@@ -154,11 +154,11 @@ def load_feed():
if list_of_articles is not None:
for article in list_of_articles:
- sha256_hash = hashlib.sha256()
- sha256_hash.update(article[5].encode('utf-8'))
- feed_id = sha256_hash.hexdigest()
- sha256_hash.update(article[2].encode('utf-8'))
- article_id = sha256_hash.hexdigest()
+ sha1_hash = hashlib.sha1()
+ sha1_hash.update(article[5].encode('utf-8'))
+ feed_id = sha1_hash.hexdigest()
+ sha1_hash.update(article[2].encode('utf-8'))
+ article_id = sha1_hash.hexdigest()
if article[3] != "":
language = detect_language(remove_html_tags(article[3][:80]).encode('utf-8') + \
bgstack15