aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2013-03-26 19:28:45 +0100
committerCédric Bonhomme <kimble.mandel@gmail.com>2013-03-26 19:28:45 +0100
commita1aedd7f0ce8a9d0d74a6fc9ae00ef4882fb2f4d (patch)
tree042f95da52fcad159546778f1e3fae6b3b5d47ef
parentNow using html.parser for BeautifulSoup since this parser makes no attempt to... (diff)
downloadnewspipe-a1aedd7f0ce8a9d0d74a6fc9ae00ef4882fb2f4d.tar.gz
newspipe-a1aedd7f0ce8a9d0d74a6fc9ae00ef4882fb2f4d.tar.bz2
newspipe-a1aedd7f0ce8a9d0d74a6fc9ae00ef4882fb2f4d.zip
Get Unicode string of the output of BeautifulSoup.
-rwxr-xr-xsource/feedgetter.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/feedgetter.py b/source/feedgetter.py
index bdb46238..f3fa5c07 100755
--- a/source/feedgetter.py
+++ b/source/feedgetter.py
@@ -132,8 +132,8 @@ class FeedGetter(object):
description = article.description
except Exception:
description = ""
- description = str(BeautifulSoup(description, "html.parser"))
- article_title = str(BeautifulSoup(article.title, "html.parser"))
+ description = BeautifulSoup(description, "html.parser").decode()
+ article_title = BeautifulSoup(article.title, "html.parser").decode()
try:
post_date = datetime(*article.published_parsed[:6])
except:
bgstack15