Skip to content
Permalink
Browse files
Fix #256
  • Loading branch information
ralsina committed Feb 15, 2018
1 parent c0837fe commit 3f995d587d6729dae91a742d93709d1c1efbceb0
Showing with 10 additions and 3 deletions.
  1. +3 −0 v7/import_feed/conf.py.sample
  2. +1 −1 v7/import_feed/import_feed.plugin
  3. +6 −2 v7/import_feed/import_feed.py
@@ -2,3 +2,6 @@ PAGES = (
("stories/*.html", "stories", "story.tmpl"),
)

POSTS = (
("posts/*.html", "posts", "post.tmpl"),
)
@@ -7,6 +7,6 @@ PluginCategory = Command

[Documentation]
Author = Grzegorz Śliwiński
Version = 0.2
Version = 0.2.1
Website = http://www.fizyk.net.pl/
Description = Import a blog posts from a RSS/Atom feed
@@ -165,8 +165,12 @@ def import_item(self, item, out_folder=None):
return

description = ''
post_date = datetime.datetime.fromtimestamp(time.mktime(
item.published_parsed))
try:
post_date = datetime.datetime.fromtimestamp(time.mktime(
item.published_parsed))
except AttributeError:
post_date = datetime.datetime.fromtimestamp(time.mktime(
item.modified_parsed))
if item.get('content'):
for candidate in item.get('content', []):
content = candidate.value

0 comments on commit 3f995d5

Please sign in to comment.