fix(06-03): remove sys.path manipulation from zhihu_extractor.py
- Remove unnecessary sys.path.insert for current directory - Use pure relative import for markdown_converter - Package imports work correctly without path manipulation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,20 +4,11 @@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import sys
|
|
||||||
import os
|
import os
|
||||||
from typing import Dict, Optional, Any
|
from typing import Dict, Optional, Any
|
||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
# 添加当前目录到 Python 路径以支持绝对导入
|
from .markdown_converter import MarkdownConverter
|
||||||
current_dir = os.path.dirname(os.path.abspath(__file__))
|
|
||||||
if current_dir not in sys.path:
|
|
||||||
sys.path.insert(0, current_dir)
|
|
||||||
|
|
||||||
try:
|
|
||||||
from .markdown_converter import MarkdownConverter
|
|
||||||
except ImportError:
|
|
||||||
from markdown_converter import MarkdownConverter
|
|
||||||
|
|
||||||
|
|
||||||
class PlaywrightBrowser:
|
class PlaywrightBrowser:
|
||||||
|
|||||||
Reference in New Issue
Block a user