aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2012-11-20 07:42:08 +0100
committerCédric Bonhomme <kimble.mandel@gmail.com>2012-11-20 07:42:08 +0100
commitaaa2e530b71b4accc3a9cd679294d3c2cb888ce9 (patch)
tree66309a7c10ba44c28c385d4088624d226ad96531 /source
parentBetter results with Pearson. (diff)
downloadnewspipe-aaa2e530b71b4accc3a9cd679294d3c2cb888ce9.tar.gz
newspipe-aaa2e530b71b4accc3a9cd679294d3c2cb888ce9.tar.bz2
newspipe-aaa2e530b71b4accc3a9cd679294d3c2cb888ce9.zip
Updated the feedgetter accordingly issues 310 and 328 of feedparser: "To avoid breaking existing software while fixing issue 310, a temporary mapping has been created from `updated_parsed` to `published_parsed` if `updated_parsed` doesn't exist. This fallback will be removed in a future version of feedparser".
Diffstat (limited to 'source')
-rwxr-xr-xsource/feedgetter.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/feedgetter.py b/source/feedgetter.py
index f28308a7..302415f6 100755
--- a/source/feedgetter.py
+++ b/source/feedgetter.py
@@ -127,11 +127,10 @@ class FeedGetter(object):
description = ""
description = str(BeautifulSoup(description))
article_title = str(BeautifulSoup(article.title))
-
try:
- post_date = datetime(*article.updated_parsed[:6])
- except:
post_date = datetime(*article.published_parsed[:6])
+ except:
+ post_date = datetime(*article.updated_parsed[:6])
sha1_hash = hashlib.sha1()
sha1_hash.update(article.link.encode('utf-8'))
bgstack15