xhs-profile-archive
Use this skill when the user wants full-profile scraping/backup for Xiaohongshu.
Inputs
- Profile URL (must contain
/user/profile/<user_id>) - Output root path (optional, default in script)
Workflow
- Ensure browser login cookies exist for xiaohongshu.com (local Chrome cookie store).
- Run script:
python3 scripts/download_xhs_profile_full.py --profile-url "<URL>" --output-root "<DIR>"
- Validate output:
summary.jsonexistsnotes_index.jsonexistsnotes/*/content.md,notes/*/comments.json,notes/*/images/exist
- Return absolute archive path and counts.
- Mandatory memory update:
- append scrape stability notes to
../state/YYYY-MM-DD-<topic>.md - if retry/fallback strategy improved, update
../LEARNINGS.md - commit + push to
main
- append scrape stability notes to
Output contract
summary.json: note/image/comment totalsnotes_index.json: per-note indexnotes/<idx_noteid>/content.mdnotes/<idx_noteid>/note_detail.jsonnotes/<idx_noteid>/comments.jsonnotes/<idx_noteid>/images/*
Safety
- Use logged-in session only; do not bypass auth.
- If comments are partially missing, report it explicitly.