Fix category and tags for search
This commit is contained in:
@@ -109,9 +109,14 @@ class Tipue_Search_JSON_Generator(object):
|
||||
video_src = article.og_video if getattr(
|
||||
article, 'og_video', 'None') != 'None' else ''
|
||||
|
||||
# category
|
||||
video_category = article.category.name if getattr(
|
||||
article, 'category', 'None') != 'None' else ''
|
||||
|
||||
# tags
|
||||
data_tags = ['%s' % (tag) for tag in article.tags]
|
||||
video_tags = dict((num, tag) for num, tag in enumerate(data_tags))
|
||||
|
||||
node = {'title': video_title,
|
||||
'description': video_text,
|
||||
'videoThumbnail': url_image,
|
||||
@@ -123,7 +128,8 @@ class Tipue_Search_JSON_Generator(object):
|
||||
'published': video_publish,
|
||||
'publishedText': video_publish_text,
|
||||
'time': video_time,
|
||||
'tags': video_category,
|
||||
'category': video_category,
|
||||
'keywords': video_tags,
|
||||
'url': video_url}
|
||||
|
||||
self.json_nodes.append(node)
|
||||
|
||||
Reference in New Issue
Block a user