From 986733e8fbc80590413f1bb9cae54719391aeaa6 Mon Sep 17 00:00:00 2001 From: Steve Schwarz Date: Tue, 26 Feb 2013 07:32:05 -0600 Subject: [PATCH] Corrected parsing of categories/tags --- pelican/tools/pelican_import.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pelican/tools/pelican_import.py b/pelican/tools/pelican_import.py index 04747509..b3587a13 100755 --- a/pelican/tools/pelican_import.py +++ b/pelican/tools/pelican_import.py @@ -49,11 +49,11 @@ def wp2fields(xml): date_object = time.strptime(raw_date, "%Y-%m-%d %H:%M:%S") date = time.strftime("%Y-%m-%d %H:%M", date_object) author = item.find('creator').string - - categories = [cat.string for cat in item.findAll(name='category')] + + categories = [cat.string for cat in item.findAll('category', {'domain' : 'category'})] # caturl = [cat['nicename'] for cat in item.find(domain='category')] - tags = [tag.string for tag in item.findAll(name='post_tag')] + tags = [tag.string for tag in item.findAll('category', {'domain' : 'post_tag'})] yield (title, content, filename, date, author, categories, tags, "html")