xiaohongshu work url parsing and metadata extraction
Parses XiaoHongShu (RedNote) work URLs to extract structured metadata including post ID, author information, caption text, image/video URLs, and engagement metrics. Uses HTTP request interception with cookie-based authentication to bypass platform anti-scraping measures and retrieve JSON API responses from XHS endpoints, then deserializes and normalizes the response into a standardized work object with media asset references.
Unique: Implements cookie-based session authentication with automatic refresh logic and XHS-specific JSON API endpoint targeting, rather than HTML parsing or Selenium-based browser automation, enabling 10-50x faster extraction with lower resource overhead
vs alternatives: Faster and more reliable than browser automation tools (Selenium, Puppeteer) because it directly calls XHS JSON APIs after cookie authentication, avoiding DOM parsing and browser overhead
watermark-free media download with format conversion
Downloads image and video files from XiaoHongShu work URLs and removes platform watermarks by fetching clean media assets directly from XHS CDN endpoints. Supports batch downloading with customizable file naming patterns (template-based: {work_id}_{index}_{timestamp}), automatic format conversion (MP4 video codec normalization, JPEG/PNG image optimization), and resumable downloads with partial file recovery using HTTP range requests.
Unique: Implements a dedicated Download Manager class with resumable HTTP range request support and FFmpeg-based codec normalization, rather than simple file.write() operations, enabling recovery from network interruptions and guaranteed output format compatibility
vs alternatives: More robust than generic download tools because it handles XHS-specific CDN authentication, implements resumable downloads with partial file tracking, and automatically normalizes video codecs for cross-platform compatibility
sqlite-based download history and work metadata persistence
Stores all downloaded works, extracted links, and search results in a SQLite database with tables for works (work_id, title, author, media_urls, download_status), downloads (download_id, work_id, timestamp, file_paths), and searches (search_query, result_count, timestamp). Implements deduplication logic to prevent re-downloading the same work, tracks download status (pending, completed, failed), and enables querying download history by date range, author, or content type. Database schema includes indexes on frequently-queried columns (work_id, timestamp) for performance.
Unique: Implements SQLite schema with deduplication indexes and download status tracking, enabling efficient duplicate detection and resumable downloads, rather than simple file-based logging
vs alternatives: More reliable than file-based logging because it provides structured querying, deduplication, and transactional consistency, enabling complex analysis and preventing accidental re-downloads
cookie-based authentication with automatic session refresh
Manages XiaoHongShu session authentication by storing and refreshing cookies in a persistent cookie jar. Reads cookies from browser storage (via browser extension or manual export) or accepts cookies as configuration input. Implements automatic cookie refresh logic that detects expired sessions (HTTP 401 responses) and attempts to refresh cookies using stored refresh tokens or re-authentication flow. Validates cookie freshness before each request and logs authentication failures for debugging.
Unique: Implements automatic cookie refresh detection (HTTP 401 response handling) with fallback re-authentication flow, rather than requiring manual cookie updates, enabling long-running processes without user intervention
vs alternatives: More reliable than manual cookie management because it automatically detects and refreshes expired sessions, reducing authentication failures and enabling unattended operation
customizable file naming and folder organization with template variables
Supports template-based file naming and folder organization using variable substitution. Naming templates can include variables like {work_id}, {author}, {title}, {timestamp}, {index} which are replaced with actual values from work metadata. Implements folder structure templates (e.g., {author}/{timestamp}/{work_id}) for organizing downloads into hierarchical directories. Validates template syntax and provides default templates for common use cases (flat structure, author-based organization, date-based organization).
Unique: Implements variable substitution with metadata-driven template expansion and automatic special character sanitization, rather than fixed naming schemes, enabling flexible organization without code changes
vs alternatives: More flexible than tools with fixed naming schemes because it supports arbitrary folder hierarchies and file naming patterns, enabling users to organize downloads according to their own preferences
batch processing with rate limiting and error recovery
Supports batch downloading of multiple XHS URLs with configurable rate limiting to avoid triggering XHS anti-scraping measures. Implements exponential backoff retry logic for failed downloads (retry up to 3 times with increasing delays), tracks download progress across the batch, and provides detailed error reports for failed items. Rate limiting is configurable (requests per second, delay between downloads) and can be adjusted based on observed XHS response patterns.
Unique: Implements exponential backoff retry logic with configurable rate limiting and detailed error tracking, rather than simple sequential processing, enabling robust batch operations that recover from transient failures
vs alternatives: More reliable than simple batch scripts because it automatically retries failed downloads, implements rate limiting to avoid IP blocking, and provides detailed error reports for debugging
configuration management with settings.json persistence and validation
Manages all user-configurable parameters through a settings.json file with schema validation and default values. Supports configuration hierarchy: command-line arguments override settings.json, which overrides built-in defaults. Implements configuration validation (type checking, range validation for numeric fields, enum validation for choice fields) and provides clear error messages for invalid configurations. Automatically migrates settings.json schema when application version changes, preserving user settings while adding new fields.
Unique: Implements configuration hierarchy (CLI args > settings.json > defaults) with schema validation and automatic migration, rather than hard-coded defaults, enabling flexible configuration without code changes
vs alternatives: More maintainable than tools with hard-coded configuration because it supports persistent settings, command-line overrides, and automatic schema migration, reducing user friction and supporting multiple deployment scenarios
user profile link extraction and work collection aggregation
Extracts and aggregates work links from XiaoHongShu user profiles across multiple collection types: published works, bookmarked/saved posts, liked posts, and custom albums. Uses paginated API requests to the XHS user profile endpoint with cursor-based pagination, iterating through all available pages to build a complete inventory of work URLs. Stores extracted links in SQLite database with metadata (collection type, extraction timestamp, user ID) for deduplication and tracking.
Unique: Implements cursor-based pagination state management with SQLite deduplication tracking, rather than simple list accumulation, enabling recovery from interruptions and prevention of duplicate URL extraction across multiple runs
vs alternatives: More complete than manual profile browsing because it automatically handles pagination across all work collections and stores results persistently, avoiding manual copy-paste and enabling batch processing of multiple profiles
+7 more capabilities