Skip to content

Commit

Permalink
Fix #256
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed Feb 15, 2018
1 parent c0837fe commit 3f995d5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions v7/import_feed/conf.py.sample
Expand Up @@ -2,3 +2,6 @@ PAGES = (
("stories/*.html", "stories", "story.tmpl"),
)

POSTS = (
("posts/*.html", "posts", "post.tmpl"),
)
2 changes: 1 addition & 1 deletion v7/import_feed/import_feed.plugin
Expand Up @@ -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
8 changes: 6 additions & 2 deletions v7/import_feed/import_feed.py
Expand Up @@ -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
Expand Down

0 comments on commit 3f995d5

Please sign in to comment.