fix(08): resolve Wave 1 file conflict - move 08-02 to Wave 2
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
phase: 08-crawler
|
||||
plan: 02
|
||||
type: execute
|
||||
wave: 1
|
||||
depends_on: []
|
||||
wave: 2
|
||||
depends_on: [08-01]
|
||||
files_modified:
|
||||
- kb_workflow/crawler/zhihu_crawler.py
|
||||
- kb_workflow/crawler/models.py
|
||||
@@ -52,6 +52,7 @@ Output: crawl_comments() 方法 + CommentData 模型 + 测试
|
||||
@.planning/STATE.md
|
||||
@.planning/phases/08-crawler/08-CONTEXT.md
|
||||
@.planning/phases/08-crawler/08-RESEARCH.md
|
||||
@.planning/phases/08-crawler/08-01-SUMMARY.md
|
||||
|
||||
<interfaces>
|
||||
<!-- 热门评论 API (from RESEARCH.md) -->
|
||||
@@ -84,6 +85,41 @@ https://www.zhihu.com/api/v4/comment_v5/{content_type}/{content_id}/comments
|
||||
"paging": {...}
|
||||
}
|
||||
```
|
||||
|
||||
<!-- 08-01 创建的接口 (此计划依赖) -->
|
||||
|
||||
From kb_workflow/crawler/models.py (created by 08-01):
|
||||
```python
|
||||
class AnswerData(BaseModel):
|
||||
id: int
|
||||
question_id: int
|
||||
question_title: str
|
||||
content: str
|
||||
excerpt: str
|
||||
metadata: ContentMetadata
|
||||
|
||||
class ArticleData(BaseModel):
|
||||
id: int
|
||||
title: str
|
||||
content: str
|
||||
excerpt: str
|
||||
metadata: ContentMetadata
|
||||
|
||||
class CrawlResult(BaseModel):
|
||||
success: bool
|
||||
content_type: str
|
||||
data: Optional[AnswerData | ArticleData] = None
|
||||
error: Optional[str] = None
|
||||
```
|
||||
|
||||
From kb_workflow/crawler/zhihu_crawler.py (created by 08-01):
|
||||
```python
|
||||
class ZhihuCrawler:
|
||||
def crawl_answer(self, url: str) -> CrawlResult
|
||||
def crawl_article(self, url: str) -> CrawlResult
|
||||
def _get_cookie(self) -> str
|
||||
def _parse_metadata(self, data: Dict) -> ContentMetadata
|
||||
```
|
||||
</interfaces>
|
||||
</context>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user