|
@@ -356,8 +356,40 @@ class Recommend:
|
|
Feishu.dimension_range(log_type, "shipinhao", "FSDlBy", "ROWS", 2, 2)
|
|
Feishu.dimension_range(log_type, "shipinhao", "FSDlBy", "ROWS", 2, 2)
|
|
Common.logger(log_type).error('download_publish异常,删除视频信息成功:{}\n', e)
|
|
Common.logger(log_type).error('download_publish异常,删除视频信息成功:{}\n', e)
|
|
|
|
|
|
|
|
+ # 过滤词库
|
|
|
|
+ @classmethod
|
|
|
|
+ def filter_words(cls, log_type):
|
|
|
|
+ try:
|
|
|
|
+ filter_words_sheet = Feishu.get_values_batch(log_type, 'shipinhao', 'PYennl')
|
|
|
|
+ filter_words_list = []
|
|
|
|
+ for x in filter_words_sheet:
|
|
|
|
+ for y in x:
|
|
|
|
+ if y is None:
|
|
|
|
+ pass
|
|
|
|
+ else:
|
|
|
|
+ filter_words_list.append(y)
|
|
|
|
+ return filter_words_list
|
|
|
|
+ except Exception as e:
|
|
|
|
+ Common.logger(log_type).error('filter_words异常:{}\n', e)
|
|
|
|
+
|
|
|
|
+ # 用户名黑名单
|
|
|
|
+ @classmethod
|
|
|
|
+ def username_blacklist(cls, log_type):
|
|
|
|
+ try:
|
|
|
|
+ username_blacklist_sheet = Feishu.get_values_batch(log_type, 'shipinhao', 'nkKrdl')
|
|
|
|
+ username_blacklist_list = []
|
|
|
|
+ for x in username_blacklist_sheet:
|
|
|
|
+ for y in x:
|
|
|
|
+ if y is None:
|
|
|
|
+ pass
|
|
|
|
+ else:
|
|
|
|
+ username_blacklist_list.append(y)
|
|
|
|
+ return username_blacklist_list
|
|
|
|
+ except Exception as e:
|
|
|
|
+ Common.logger(log_type).error('filter_words异常:{}\n', e)
|
|
|
|
+
|
|
|
|
|
|
if __name__ == '__main__':
|
|
if __name__ == '__main__':
|
|
- Publish.upload_and_publish('recommend', 'dev', "play")
|
|
|
|
|
|
+ print(Recommend.username_blacklist('recommend'))
|
|
|
|
|
|
pass
|
|
pass
|