def parse_non_wp_blogs(blog):
from wsgi import non_wp_blogs
feed = feedparser.parse(blog)
post_table = []
for item in feed.entries:
title = item.title
url = item.link
post_date = DateTime(item.published).ISO()[:-9]
try:
author = item.author
except:
author = "N/A"
tags = get_tags(url)
curr_content = ""#get_content(non_wp_url = url)
post_table.append({'title': title, 'author': author, 'post_date': post_date, 'tags': tags, 'url': url, 'views': 0, 'content': curr_content})
return post_table
评论列表
文章目录