fix(06-03): remove sys.path manipulation from zhihu_metadata.py

- Remove unnecessary sys.path.insert for current directory
- Use relative import for zhihu_extractor
- Package imports work correctly without path manipulation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-17 00:33:23 +08:00
parent 2b305b0eb9
commit 81d67b7672
+1 -6
View File
@@ -15,12 +15,7 @@ import sys
import os
from typing import Dict, Optional, Any
# 添加当前目录到 Python 路径
current_dir = os.path.dirname(os.path.abspath(__file__))
if current_dir not in sys.path:
sys.path.insert(0, current_dir)
from zhihu_extractor import ZhihuPlaywrightExtractor
from .zhihu_extractor import ZhihuPlaywrightExtractor
def extract_zvideo(video_id: str, headless: bool = True, cookie: str = None) -> Dict[str, Any]: