@@ -313,7 +313,8 @@ async def main(video_path):
"品类-中国历史影像\n" \
"品类-国际军事\n" \
"品类-国内军事\n" \
- "品类-国家统一\n"
+ "品类-国家统一\n" \
+ "输出格式:要求输出格式为符合RFC8259标准的JSON格式的字符串"
# 分析视频并打印结果
@@ -23,8 +23,8 @@ class VideoProcessing:
try:
response = response.json()
result = response['result']
- print(result)
- return result
+ cleaned_string = result.replace( "```json", '' ).replace( "```", '' ).strip()
+ return cleaned_string
except Exception as e:
print(f"视频请求异常:{e}")
return None