fix(kb-workflow): 修正路径管理和子技能逻辑
- kb_workflow.py: 修复目录查询命令(--pending, --metadata等) - bilibili_metadata.py: headless默认True,逻辑保持纯净 - deep_analyzer.py: 添加缺失的pathlib.Path导入 - SKILL.md: 更新步骤说明,明确由workflow提供路径给子技能 fix: 修复Playwright启动失败(NameError)和路径自动获取问题
This commit is contained in:
@@ -9,7 +9,9 @@ B站元数据提取 CLI 工具
|
||||
import argparse
|
||||
import asyncio
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import Dict, Any
|
||||
|
||||
from bilibili_extractor import BilibiliExtractor
|
||||
@@ -145,8 +147,8 @@ def main():
|
||||
parser.add_argument(
|
||||
'--headless',
|
||||
action='store_true',
|
||||
default=False,
|
||||
help='使用无头模式(浏览器,默认关闭,使用API)'
|
||||
default=True,
|
||||
help='使用无头模式(浏览器,默认开启,使用API)'
|
||||
)
|
||||
parser.add_argument(
|
||||
'--timeout',
|
||||
@@ -208,6 +210,11 @@ def main():
|
||||
|
||||
print(json.dumps(output, ensure_ascii=False, indent=2))
|
||||
|
||||
# 如果指定了输出路径,则写入文件
|
||||
if args.output:
|
||||
with open(args.output, 'w', encoding='utf-8') as f:
|
||||
json.dump(result, f, ensure_ascii=False, indent=2)
|
||||
|
||||
except Exception as e:
|
||||
print(json.dumps({
|
||||
"success": False,
|
||||
|
||||
Reference in New Issue
Block a user