|
@@ -357,7 +357,33 @@ class Demo:
|
|
|
print(f"原标题:{befor_video_title}")
|
|
|
print(f"加表情后的标题:{video_title}")
|
|
|
|
|
|
+ @classmethod
|
|
|
+ def demo1(cls):
|
|
|
+ char_sheet = Feishu.get_values_batch("hour", "xiaoniangao", "BhlbST")
|
|
|
+ # print(char_sheet)
|
|
|
+ expression_list = []
|
|
|
+ char_list = []
|
|
|
+ for q in range(len(char_sheet)):
|
|
|
+ if char_sheet[q][0] is not None:
|
|
|
+ expression_list.append(char_sheet[q][0])
|
|
|
+ if char_sheet[q][1] is not None:
|
|
|
+ char_list.append(char_sheet[q][1])
|
|
|
+ befor_video_title = "今天星期二"
|
|
|
+ expression = random.choice(expression_list)
|
|
|
+ print(f"随机表情:{expression}")
|
|
|
+ expression_title_list = [expression + befor_video_title, befor_video_title + expression]
|
|
|
+ print(f"随机表情+标题列表:{expression_title_list}")
|
|
|
+ # 标题,表情随机加在片头
|
|
|
+ title_list1 = random.choice(expression_title_list)
|
|
|
+ print(f"随机表情+标题:{title_list1}")
|
|
|
+ # 标题,表情随机加在片尾
|
|
|
+ title_list2 = befor_video_title + random.choice(char_list)
|
|
|
+ print(f"随机表情+符号:{title_list2}")
|
|
|
+ title_list4 = [title_list1, title_list2]
|
|
|
+ video_title = random.choice(title_list4)
|
|
|
+ print(f"最终标题:{video_title}")
|
|
|
+
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
demo = Demo()
|
|
|
- demo.update_title()
|
|
|
+ demo.demo1()
|