|
@@ -214,7 +214,7 @@ class HourList:
|
|
char_sheet = Feishu.get_values_batch("hour", "xiaoniangao", "BhlbST")
|
|
char_sheet = Feishu.get_values_batch("hour", "xiaoniangao", "BhlbST")
|
|
expression_list = []
|
|
expression_list = []
|
|
char_list = []
|
|
char_list = []
|
|
- for q in range(1, len(char_sheet)):
|
|
|
|
|
|
+ for q in range(len(char_sheet)):
|
|
if char_sheet[q][0] is not None:
|
|
if char_sheet[q][0] is not None:
|
|
expression_list.append(char_sheet[i][0])
|
|
expression_list.append(char_sheet[i][0])
|
|
if char_sheet[q][1] is not None:
|
|
if char_sheet[q][1] is not None:
|
|
@@ -225,13 +225,19 @@ class HourList:
|
|
.replace(":", "").replace("*", "").replace("?", "") \
|
|
.replace(":", "").replace("*", "").replace("?", "") \
|
|
.replace("?", "").replace('"', "").replace("<", "") \
|
|
.replace("?", "").replace('"', "").replace("<", "") \
|
|
.replace(">", "").replace("|", "").replace(" ", "").replace("#表情", "").replace("#符号", "")
|
|
.replace(">", "").replace("|", "").replace(" ", "").replace("#表情", "").replace("#符号", "")
|
|
|
|
+ # 随机取一个表情
|
|
expression = random.choice(expression_list)
|
|
expression = random.choice(expression_list)
|
|
|
|
+ # 生成标题list[表情+title, title+表情]
|
|
expression_title_list = [expression + befor_video_title, befor_video_title + expression]
|
|
expression_title_list = [expression + befor_video_title, befor_video_title + expression]
|
|
|
|
+ # 从标题list中随机取一个标题
|
|
title_list1 = random.choice(expression_title_list)
|
|
title_list1 = random.choice(expression_title_list)
|
|
|
|
+ # 生成标题:原标题+符号
|
|
title_list2 = befor_video_title + random.choice(char_list)
|
|
title_list2 = befor_video_title + random.choice(char_list)
|
|
- title_list3 = befor_video_title.replace(
|
|
|
|
- ",", random.choice(expression_list)).replace(",", random.choice(expression_list))
|
|
|
|
- title_list4 = [title_list1, title_list2, title_list3]
|
|
|
|
|
|
+ # title_list3 = befor_video_title.replace(
|
|
|
|
+ # ",", random.choice(expression_list)).replace(",", random.choice(expression_list))
|
|
|
|
+ # 表情和标题组合,与标题和符号组合,汇总成待使用的标题列表
|
|
|
|
+ title_list4 = [title_list1, title_list2]
|
|
|
|
+ # 最终标题
|
|
video_title = random.choice(title_list4)
|
|
video_title = random.choice(title_list4)
|
|
else:
|
|
else:
|
|
video_title = 0
|
|
video_title = 0
|