|
@@ -57,7 +57,6 @@ def insertTask():
|
|
|
outer_info = data.get('spider_link')
|
|
|
source = data.get('source')
|
|
|
exist_outer_info = list()
|
|
|
-
|
|
|
s_sql = f"""select spider_link from crawler_task where source='{source}'"""
|
|
|
result = MysqlHelper.get_values(s_sql)
|
|
|
if result:
|
|
@@ -192,17 +191,6 @@ def createUser():
|
|
|
fail_list = list()
|
|
|
for author_url in spider_link:
|
|
|
try:
|
|
|
- post_data = {
|
|
|
- # 'count': 1, # (必须)账号个数:传1
|
|
|
- # 'accountType': 4, # (必须)账号类型 :传 4 app虚拟账号
|
|
|
- 'pwd': '', # 密码 默认 12346
|
|
|
- 'nickName': '', # 昵称 默认 vuser......
|
|
|
- 'avatarUrl': '',
|
|
|
- # 头像Url 默认 http://weapppiccdn.yishihui.com/resources/images/pic_normal.png
|
|
|
- 'tagName': user_tag, # 多条数据用英文逗号分割
|
|
|
- }
|
|
|
- response = requests.post(url=get_media_url, params=post_data)
|
|
|
- media_id = response.json()['data']
|
|
|
f_sql = f"""select spider_link from crawler_author_map where spider_link="{author_url}" """
|
|
|
result = MysqlHelper.get_values(f_sql)
|
|
|
if result:
|
|
@@ -211,7 +199,17 @@ def createUser():
|
|
|
else:
|
|
|
tag_name_list = []
|
|
|
content_tag_list = []
|
|
|
-
|
|
|
+ post_data = {
|
|
|
+ # 'count': 1, # (必须)账号个数:传1
|
|
|
+ # 'accountType': 4, # (必须)账号类型 :传 4 app虚拟账号
|
|
|
+ 'pwd': '', # 密码 默认 12346
|
|
|
+ 'nickName': '', # 昵称 默认 vuser......
|
|
|
+ 'avatarUrl': '',
|
|
|
+ # 头像Url 默认 http://weapppiccdn.yishihui.com/resources/images/pic_normal.png
|
|
|
+ 'tagName': user_tag, # 多条数据用英文逗号分割
|
|
|
+ }
|
|
|
+ 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:
|