Commit 554e53e7 authored by haowang's avatar haowang

Merge branch 'master' of http://git.wanmeizhensuo.com/alpha/saturn into haow/pin_crawl

parents b74db2b8 c996ed6f
......@@ -114,7 +114,7 @@ class CreateTopicForBatch(BaseView):
)
if _tag_error:
return self.error(_tag_error)
_tag_data.update(location_tags)
#_tag_data.update(location_tags)
# 更新发帖
# 处理标签,将文本中的标签处理成现有标签
......@@ -125,7 +125,7 @@ class CreateTopicForBatch(BaseView):
#添加地域标签
if item.get("location") and item.get("location").get("name"):
tags.append(item.get("location").get("name"))
content = item["content"]
content = item.get("content")
for tag_name, tag_id in _tag_data.items():
if tag_name in tags:
alpha_tag = '<topic>{' + '"id":{},"name":"{}"'.format(tag_id, tag_name) + '}</topic>'
......@@ -214,7 +214,7 @@ class CreateTopicForBatchByOne(BaseView):
for item in need_create_topics:
tags = item.get("tags") or []
tags = [tag.replace("#", '').strip() for tag in tags]
content = item["content"]
content = item.get("content")
for tag_name, tag_id in _tag_data.items():
if tag_name in tags:
alpha_tag = '<topic>{' + '"id":{},"name":"{}"'.format(tag_id, tag_name) + '}</topic>'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment