diff options
author | Cédric Bonhomme <kimble.mandel@gmail.com> | 2012-11-20 07:42:08 +0100 |
---|---|---|
committer | Cédric Bonhomme <kimble.mandel@gmail.com> | 2012-11-20 07:42:08 +0100 |
commit | aaa2e530b71b4accc3a9cd679294d3c2cb888ce9 (patch) | |
tree | 66309a7c10ba44c28c385d4088624d226ad96531 /source | |
parent | Better results with Pearson. (diff) | |
download | newspipe-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-x | source/feedgetter.py | 5 |
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')) |