|
@@ -101,16 +101,17 @@ class Material():
|
|
|
tags = row[3]
|
|
|
piaoquan_id = row[4]
|
|
|
number = row[5]
|
|
|
- video_share = row[6]
|
|
|
- video_ending = row[7]
|
|
|
- voice = row[8]
|
|
|
- crop_tool = row[9]
|
|
|
- gg_duration = row[10]
|
|
|
- title = row[11]
|
|
|
+ limit_number = row[6]
|
|
|
+ video_share = row[7]
|
|
|
+ video_ending = row[8]
|
|
|
+ voice = row[9]
|
|
|
+ crop_tool = row[10]
|
|
|
+ gg_duration = row[11]
|
|
|
+ title = row[12]
|
|
|
if channel_url == None or channel_url == "" or len(channel_url) == 0:
|
|
|
continue
|
|
|
- first_category = row[13] # 一级品类
|
|
|
- secondary_category = row[14] # 二级品类
|
|
|
+ first_category = row[14] # 一级品类
|
|
|
+ secondary_category = row[15] # 二级品类
|
|
|
def count_items(item, separator):
|
|
|
if item and item not in {'None', ''}:
|
|
|
return len(item.split(separator))
|
|
@@ -121,10 +122,10 @@ class Material():
|
|
|
values = [channel_id, video_id_total, piaoquan_id, video_share, video_ending_total, crop_tool, gg_duration, title_total, first_category]
|
|
|
filtered_values = [str(value) for value in values if value is not None and value != "None"]
|
|
|
task_mark = "_".join(map(str, filtered_values))
|
|
|
- keyword_sort = row[15] # 排序条件
|
|
|
- keyword_time = row[16] # 发布时间
|
|
|
- keyword_duration = row[17] # 视频时长
|
|
|
- keyword_name = row[18] # 负责人
|
|
|
+ keyword_sort = row[16] # 排序条件
|
|
|
+ keyword_time = row[17] # 发布时间
|
|
|
+ keyword_duration = row[18] # 视频时长
|
|
|
+ keyword_name = row[19] # 负责人
|
|
|
keyword_sort_list = keyword_sort.split(',')
|
|
|
keyword_duration_list = keyword_duration.split(',')
|
|
|
keyword_time_list = keyword_time.split(',')
|
|
@@ -151,7 +152,8 @@ class Material():
|
|
|
"secondary_category": secondary_category, # 二级品类
|
|
|
"combo": combo, # 搜索条件
|
|
|
"keyword_name": keyword_name, # 品类负责人
|
|
|
- "tags": tags
|
|
|
+ "tags": tags,
|
|
|
+ "limit_number":limit_number
|
|
|
|
|
|
}
|
|
|
processed_list.append(json.dumps(number_dict, ensure_ascii=False))
|
|
@@ -175,20 +177,21 @@ class Material():
|
|
|
tags = row[3]
|
|
|
piaoquan_id = row[4]
|
|
|
number = row[5]
|
|
|
- video_share = row[6]
|
|
|
- video_ending = row[7]
|
|
|
- voice = row[8]
|
|
|
- crop_tool = row[9]
|
|
|
- gg_duration = row[10]
|
|
|
- title = row[11]
|
|
|
+ limit_number = row[6]
|
|
|
+ video_share = row[7]
|
|
|
+ video_ending = row[8]
|
|
|
+ voice = row[9]
|
|
|
+ crop_tool = row[10]
|
|
|
+ gg_duration = row[11]
|
|
|
+ title = row[12]
|
|
|
if channel_url == None or channel_url == "" or len( channel_url ) == 0:
|
|
|
continue
|
|
|
try:
|
|
|
- ls_number = int( row[12] )
|
|
|
+ ls_number = int( row[13] )
|
|
|
except:
|
|
|
ls_number = None
|
|
|
- first_category = row[13]
|
|
|
- name = row[14]
|
|
|
+ first_category = row[14]
|
|
|
+ name = row[15]
|
|
|
|
|
|
def count_items(item, separator):
|
|
|
if item and item not in {'None', ''}:
|
|
@@ -222,7 +225,8 @@ class Material():
|
|
|
"voice": voice,
|
|
|
"first_category": first_category, # 一级品类
|
|
|
"keyword_name":name,
|
|
|
- "tags": tags
|
|
|
+ "tags": tags,
|
|
|
+ "limit_number":limit_number
|
|
|
}
|
|
|
processed_list.append( json.dumps( number_dict, ensure_ascii=False ) )
|
|
|
if channel_id == "抖音" or channel_id == "快手" or channel_id == "视频号":
|
|
@@ -234,14 +238,14 @@ class Material():
|
|
|
if channel_id == "视频号":
|
|
|
new_channel_id = "视频号历史"
|
|
|
|
|
|
- values1 = [new_channel_id, video_id_total, piaoquan_id, video_share, video_ending_total,
|
|
|
- crop_tool,
|
|
|
- gg_duration, title_total]
|
|
|
- filtered_values1 = [str( value ) for value in values1 if
|
|
|
- value is not None and value != "None"]
|
|
|
- task_mark1 = "_".join( map( str, filtered_values1 ) )
|
|
|
+ # values1 = [new_channel_id, video_id_total, piaoquan_id, video_share, video_ending_total,
|
|
|
+ # crop_tool,
|
|
|
+ # gg_duration, title_total]
|
|
|
+ # filtered_values1 = [str( value ) for value in values1 if
|
|
|
+ # value is not None and value != "None"]
|
|
|
+ # task_mark1 = "_".join( map( str, filtered_values1 ) )
|
|
|
number_dict = {
|
|
|
- "task_mark": task_mark1,
|
|
|
+ "task_mark": task_mark,
|
|
|
"channel_id": new_channel_id,
|
|
|
"channel_url": user,
|
|
|
"piaoquan_id": piaoquan_id,
|
|
@@ -254,7 +258,8 @@ class Material():
|
|
|
"voice": voice,
|
|
|
"first_category": first_category, # 一级品类
|
|
|
"keyword_name": name,
|
|
|
- "tags": tags
|
|
|
+ "tags": tags,
|
|
|
+ "limit_number":limit_number
|
|
|
}
|
|
|
processed_list.append( json.dumps( number_dict, ensure_ascii=False ) )
|
|
|
else:
|
|
@@ -280,16 +285,17 @@ class Material():
|
|
|
tags = row[3]
|
|
|
piaoquan_id = row[4]
|
|
|
number = row[5]
|
|
|
- video_share = row[6]
|
|
|
- video_ending = row[7]
|
|
|
- voice = row[8]
|
|
|
- crop_tool = row[9]
|
|
|
- gg_duration = row[10]
|
|
|
- title = row[11]
|
|
|
+ limit_number = row[6]
|
|
|
+ video_share = row[7]
|
|
|
+ video_ending = row[8]
|
|
|
+ voice = row[9]
|
|
|
+ crop_tool = row[10]
|
|
|
+ gg_duration = row[11]
|
|
|
+ title = row[12]
|
|
|
if channel_url == None or channel_url == "" or len(channel_url) == 0:
|
|
|
continue
|
|
|
try:
|
|
|
- ls_number = int(row[12])
|
|
|
+ ls_number = int(row[13])
|
|
|
except:
|
|
|
ls_number = None
|
|
|
def count_items(item, separator):
|
|
@@ -320,7 +326,8 @@ class Material():
|
|
|
"crop_total": crop_tool,
|
|
|
"gg_duration_total": gg_duration,
|
|
|
"voice": voice,
|
|
|
- "tags":tags
|
|
|
+ "tags":tags,
|
|
|
+ "limit_number":limit_number
|
|
|
}
|
|
|
processed_list.append(json.dumps(number_dict, ensure_ascii=False))
|
|
|
if channel_id == "抖音" or channel_id == "快手" or channel_id == "视频号":
|
|
@@ -332,12 +339,12 @@ class Material():
|
|
|
if channel_id == "视频号":
|
|
|
new_channel_id = "视频号历史"
|
|
|
|
|
|
- values1 = [new_channel_id, video_id_total, piaoquan_id, video_share, video_ending_total, crop_tool,
|
|
|
- gg_duration, title_total]
|
|
|
- filtered_values1 = [str(value) for value in values1 if value is not None and value != "None"]
|
|
|
- task_mark1 = "_".join(map(str, filtered_values1))
|
|
|
+ # values1 = [new_channel_id, video_id_total, piaoquan_id, video_share, video_ending_total, crop_tool,
|
|
|
+ # gg_duration, title_total]
|
|
|
+ # filtered_values1 = [str(value) for value in values1 if value is not None and value != "None"]
|
|
|
+ # task_mark1 = "_".join(map(str, filtered_values1))
|
|
|
number_dict = {
|
|
|
- "task_mark": task_mark1,
|
|
|
+ "task_mark": task_mark,
|
|
|
"channel_id": new_channel_id,
|
|
|
"channel_url": user,
|
|
|
"piaoquan_id": piaoquan_id,
|
|
@@ -348,7 +355,8 @@ class Material():
|
|
|
"crop_total": crop_tool,
|
|
|
"gg_duration_total": gg_duration,
|
|
|
"voice": voice,
|
|
|
- "tags": tags
|
|
|
+ "tags": tags,
|
|
|
+ "limit_number":limit_number
|
|
|
}
|
|
|
processed_list.append(json.dumps(number_dict, ensure_ascii=False))
|
|
|
else:
|