- ARCH-04: job51 migrated to crawler_core (no old deps) - ARCH-05: zhilian migrated to crawler_core (no old deps) - 34 new mock tests (17 job51 + 17 zhilian) - Added _parse_zhilian_response custom parser for zhilian API format - Fixed POST Searcher _request() overrides for job51/zhilian - Full regression: 98 passed in 0.12s
28 lines
994 B
Markdown
28 lines
994 B
Markdown
# Plan 03-01 Summary: 迁移前程无忧(job51)层至 crawler_core
|
||
|
||
**Status:** Complete
|
||
**Tasks:** 6/6
|
||
**Commit:** 8c2c2d2
|
||
|
||
## What was built
|
||
|
||
将 `spiderJobs/platforms/job51/` 4 个文件迁移至 crawler_core:
|
||
|
||
- **client.py**:HTTPClient 改用 `crawler_core.http_client`,Job51Sign 改用 `crawler_core.qcwy.sign`
|
||
- **api.py**:
|
||
- import 改为 `crawler_core.base.Result/BaseFetcher/BaseSearcher`
|
||
- `ApiResult` 全量替换为 `Result`(共 11 处)
|
||
- 2 处 `self._http.get(` → `self.http_client.get(`(GetJobDetail/GetCompanyInfo 的覆写 fetch)
|
||
- 为 POST Searcher(SearchRecommendJobs/SearchCompanyJobs)添加 `_request()` POST 覆写
|
||
- **main.py**:BaseFetcher/BaseSearcher 改用 `crawler_core.base`
|
||
- **sign.py**:向后兼容桩,重新导出 `crawler_core.qcwy.sign.Job51Sign`
|
||
- **tests/job51/test_job51_client.py**:17 个 mock 测试,覆盖所有 API 类
|
||
|
||
## Verification
|
||
|
||
```
|
||
pytest tests/job51/ -v → 17 passed ✅
|
||
```
|
||
|
||
## Self-Check: PASSED
|