|
@@ -389,19 +389,14 @@ class AGC():
|
|
|
try:
|
|
|
d_list = list_data[count]
|
|
|
uid = d_list['uid'] # 音频id
|
|
|
- srt = d_list['text'] # srt
|
|
|
cover = d_list['cover']
|
|
|
audio_title = d_list['title']
|
|
|
- # if srt and len(srt.strip()) >= 3:
|
|
|
- # # 创建临时字幕文件
|
|
|
- # cls.create_subtitle_file(srt, s_path)
|
|
|
- # Common.logger("bk_video").info(f"S{mark} 文件目录创建成功")
|
|
|
- # else:
|
|
|
srt_new = SRT.getSrt(int(uid))
|
|
|
Common.logger("video").info(f"S{mark}的{platform}渠道音频ID{uid}")
|
|
|
if error_count == 5:
|
|
|
Feishu.bot('recommend', 'AGC异常通知', f'{platform}渠道音频id为{uid},任务处理异常5次,该任务跳过,请检查格式!', name, mark_name)
|
|
|
count += 1
|
|
|
+ time.sleep(300)
|
|
|
continue
|
|
|
if srt_new:
|
|
|
# 创建临时字幕文件
|
|
@@ -412,9 +407,14 @@ class AGC():
|
|
|
audio_video = PQ.get_audio_url(uid)
|
|
|
Common.logger("video").info(f"{mark}的{platform}渠道获音频成功{audio_video}")
|
|
|
audio_duration = cls.get_audio_duration(audio_video)
|
|
|
+ if int(audio_duration) >= 300:
|
|
|
+ count += 1
|
|
|
+ continue
|
|
|
Common.logger("video").info(f"{mark}的{platform}渠道获取需要拼接的音频秒数为:{audio_duration}")
|
|
|
except Exception as e:
|
|
|
+
|
|
|
count += 1
|
|
|
+ time.sleep(150)
|
|
|
# 清空所有mp4数据
|
|
|
cls.clear_mp4_files(mark)
|
|
|
Feishu.bot('recommend', 'AGC异常通知', f'{platform}任务下,{uid}音频格式填写错误该任务跳过,请关注', name, mark_name)
|
|
@@ -522,7 +522,7 @@ class AGC():
|
|
|
Feishu.insert_columns("IbVVsKCpbhxhSJtwYOUc8S1jnWb", "jd9qD9", "ROWS", 1, 2)
|
|
|
time.sleep(random_wait_time)
|
|
|
Feishu.update_values("IbVVsKCpbhxhSJtwYOUc8S1jnWb", "jd9qD9", "A2:Z2", values)
|
|
|
-
|
|
|
+ time.sleep(300)
|
|
|
except Exception as e:
|
|
|
error_count += 1
|
|
|
Common.logger("video").warning(f"{mark}的视频拼接失败:{e}\n")
|