c4beb3ef3c
- Implement ZhihuAdapter class inheriting PlatformAdapter - Support answer URL content extraction - Support zhuanlan (article) URL content extraction - Add cookie-based authentication from KBSettings - Detect login page redirects (expired cookies) - Return AuthError for missing/expired cookies - Format content with YAML frontmatter - Update package exports to include ZhihuAdapter Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
22 lines
598 B
Python
22 lines
598 B
Python
"""Platform Adapters for KB Pipeline
|
|
|
|
This module provides platform-specific adapters for content extraction
|
|
from various platforms (Bilibili, Zhihu, etc.).
|
|
|
|
Each adapter implements the PlatformAdapter interface:
|
|
- get_content_type: Identify content type from URL
|
|
- fetch_metadata: Fetch content metadata
|
|
- fetch_content: Fetch content body in Markdown format
|
|
- get_output_filename: Generate output filename
|
|
"""
|
|
|
|
from .base import PlatformAdapter
|
|
from .bilibili import BilibiliAdapter
|
|
from .zhihu import ZhihuAdapter
|
|
|
|
__all__ = [
|
|
"PlatformAdapter",
|
|
"BilibiliAdapter",
|
|
"ZhihuAdapter",
|
|
]
|