mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Corrected parsing of categories/tags
This commit is contained in:
parent
8a6d96b289
commit
986733e8fb
1 changed files with 3 additions and 3 deletions
|
|
@ -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")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue