Add XHS keyword search source

This commit is contained in:
wangshaoqing
2026-05-27 16:49:36 +08:00
parent 37b17d8ccf
commit f247cb1a3a
6 changed files with 159 additions and 7 deletions
@@ -0,0 +1,24 @@
# 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.