|
@@ -199,6 +199,12 @@ def createUser():
|
|
|
else:
|
|
|
tag_name_list = []
|
|
|
content_tag_list = []
|
|
|
+ for tag in user_tag:
|
|
|
+ tag_name_list.append(tag['tagName'])
|
|
|
+ for tag in user_content_tag:
|
|
|
+ content_tag_list.append(tag['tagName'])
|
|
|
+ user_tags = ','.join(str(i) for i in tag_name_list)
|
|
|
+ user_content_tags = ','.join(str(i) for i in content_tag_list)
|
|
|
post_data = {
|
|
|
# 'count': 1, # (必须)账号个数:传1
|
|
|
# 'accountType': 4, # (必须)账号类型 :传 4 app虚拟账号
|
|
@@ -206,14 +212,11 @@ def createUser():
|
|
|
'nickName': '', # 昵称 默认 vuser......
|
|
|
'avatarUrl': '',
|
|
|
# 头像Url 默认 http://weapppiccdn.yishihui.com/resources/images/pic_normal.png
|
|
|
- 'tagName': user_tag, # 多条数据用英文逗号分割
|
|
|
+ 'tagName': user_tags, # 多条数据用英文逗号分割
|
|
|
}
|
|
|
response = requests.post(url=get_media_url, params=post_data)
|
|
|
media_id = response.json()['data']
|
|
|
- for tag in user_tag:
|
|
|
- tag_name_list.append(tag['tagName'])
|
|
|
- for tag in user_content_tag:
|
|
|
- content_tag_list.append(tag['tagName'])
|
|
|
+
|
|
|
data = dict(
|
|
|
spider_link=author_url,
|
|
|
media_id=media_id,
|
|
@@ -221,8 +224,8 @@ def createUser():
|
|
|
task_type=task_type,
|
|
|
applets_status=applets_status,
|
|
|
app_status=app_status,
|
|
|
- user_tag=','.join(str(i) for i in tag_name_list),
|
|
|
- user_content_tag=','.join(str(i) for i in content_tag_list),
|
|
|
+ user_tag=user_tags,
|
|
|
+ user_content_tag=user_content_tags,
|
|
|
insert_time=int(time.time()),
|
|
|
update_time=int(time.time())
|
|
|
)
|