123456789101112131415161718192021222324252627282930 |
- """
- @author: luojunhui
- """
- import json
- from applications import aiditApi
- from config import apolloConfig
- config = apolloConfig()
- sensitive_word_list = json.loads(config.getConfigValue("sensitive_word_list"))
- def whether_title_sensitive(title: str) -> bool:
- """
- : param title:
- 判断视频是否的标题是否包含敏感词
- """
- for word in sensitive_word_list:
- if word in title:
- return True
- return False
- def get_inner_account_set() -> set:
- """
- get inner account set
- """
- accounts = aiditApi.get_publish_account_from_aigc()
- gh_id_list = [i['ghId'] for i in accounts]
- return set(gh_id_list)
|