|
@@ -7,7 +7,7 @@ import pandas as pd
|
|
|
import yaml
|
|
|
|
|
|
curr_path = os.path.abspath(os.path.dirname(__file__))
|
|
|
-project_root_path = curr_path[:curr_path.find("video-to-word") + len("video-to-word")]
|
|
|
+project_root_path = curr_path[:curr_path.find("video_to_word") + len("video_to_word")]
|
|
|
sys.path.append(project_root_path)
|
|
|
|
|
|
from common_func import get_db_engine, get_logger
|
|
@@ -16,15 +16,16 @@ from get_material_and_script.get_material_from_kuaishou_kaiyan import GetMateria
|
|
|
from get_material_and_script.get_material_from_ocean_engine import GetMaterialFromOceanEngine
|
|
|
from get_material_and_script.get_script_from_tengxunyun import GetScriptFromTengXunYunServer
|
|
|
|
|
|
+
|
|
|
if __name__ == '__main__':
|
|
|
print("test end")
|
|
|
# 创建日志对象
|
|
|
- logger = get_logger(log_file_name="/data/pythonProject/video-to-word/logs/get_high_quality_material.log",
|
|
|
+ logger = get_logger(log_file_name="/data/pythonProject/video_to_word/logs/get_high_quality_material.log",
|
|
|
log_name='get_high_quality_material_logger')
|
|
|
logger.info("get_high_quality_material_logger started! id of logger is: %s" % id(logger))
|
|
|
|
|
|
# 1 读取配置文件
|
|
|
- with open('/data/pythonProject/video-to-word/config/config.yaml', mode='r', encoding='utf-8') as f:
|
|
|
+ with open('/data/pythonProject/video_to_word/config/config.yaml', mode='r', encoding='utf-8') as f:
|
|
|
config = yaml.load(f.read(), Loader=yaml.FullLoader)
|
|
|
|
|
|
# 1-1 数据库连接引擎,依据开发环境/生产环境 进行切换
|
|
@@ -57,7 +58,7 @@ if __name__ == '__main__':
|
|
|
|
|
|
# 2-1 获取内外部优质素材
|
|
|
full_high_material_df = pd.DataFrame()
|
|
|
- writer = pd.ExcelWriter('/data/pythonProject/video-to-word/data/%s_内外部优质素材_%s.xlsx' %
|
|
|
+ writer = pd.ExcelWriter('/data/pythonProject/video_to_word/data/%s_内外部优质素材_%s.xlsx' %
|
|
|
(query_word, datetime.date.today().strftime('%Y-%m-%d')))
|
|
|
for source_code in source_code_lst:
|
|
|
if source_code == 1:
|