xhs_video_crawler/docs/superpowers/plans/2026-05-27-xhs-search-source.md
2026-05-27 16:49:36 +08:00

25 lines
1003 B
Markdown

# XHS Search Source Implementation Plan
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
**Goal:** Add `--source search --keyword <term>` to the resumable queue downloader.
**Architecture:** Extend `build_source_url`, CLI parser choices, `run_queue_download` arguments, and README examples. Reuse all queue and download code.
**Tech Stack:** Python 3, unittest, DrissionPage, requests.
---
## Task 1: Search URL and CLI
- [x] Write failing tests for encoded search source URL and CLI keyword plumbing.
- [x] Implement `build_source_url("search", keyword=...)`, parser support, and queue runner forwarding.
- [x] Run tests.
## Task 2: Docs and Smoke
- [x] Update README with search examples.
- [x] Run full unit tests.
- [x] Run a small search smoke test with `--keyword 猫咪 --target-videos 2`.
- [ ] Commit and push.