diff options
author | Cédric Bonhomme <kimble.mandel@gmail.com> | 2012-12-30 21:42:07 +0100 |
---|---|---|
committer | Cédric Bonhomme <kimble.mandel@gmail.com> | 2012-12-30 21:42:07 +0100 |
commit | 084820a7c600ca458b9f98d34db1fb255a32398b (patch) | |
tree | abaf5cd2ce5372418db3b689e3c10bb3c745e648 /source/export.py | |
parent | Minor improvements to the /feed page. (diff) | |
download | newspipe-084820a7c600ca458b9f98d34db1fb255a32398b.tar.gz newspipe-084820a7c600ca458b9f98d34db1fb255a32398b.tar.bz2 newspipe-084820a7c600ca458b9f98d34db1fb255a32398b.zip |
Bugfix in export.py for export_html().
Diffstat (limited to 'source/export.py')
-rw-r--r-- | source/export.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/export.py b/source/export.py index f2fbd729..10f4cd80 100644 --- a/source/export.py +++ b/source/export.py @@ -74,7 +74,7 @@ def export_html(mongo_db): (feed["feed_id"], feed["feed_title"]) posts = htmlheader - for article in mongo_db.get_articles_from_collection(feed["feed_id"]): + for article in mongo_db.get_articles(feed_id=feed["feed_id"]): post_file_name = os.path.normpath(feed_folder + "/" + article["article_id"] + ".html") feed_index = os.path.normpath(feed_folder + "/index.html") @@ -93,16 +93,16 @@ def export_html(mongo_db): a_post += "<hr />\n" + htmlfooter with open(post_file_name, "w") as f: - f.write(a_post.encode('utf-8')) + f.write(a_post) posts += htmlfooter with open(feed_index, "w") as f: - f.write(posts.encode('utf-8')) + f.write(posts) index += "\n</ul>\n<br />" index += htmlfooter with open(conf.path + "/var/export/webzine/" + "index.html", "w") as f: - f.write(index.encode('utf-8')) + f.write(index) def export_txt(mongo_db): """ |