Skip to content

feat: Add download support for xhs, twi, bilibili, zhihu#22

Merged
jackwener merged 3 commits intojackwener:mainfrom
ByteYue:add_download_support
Mar 18, 2026
Merged

feat: Add download support for xhs, twi, bilibili, zhihu#22
jackwener merged 3 commits intojackwener:mainfrom
ByteYue:add_download_support

Conversation

@ByteYue
Copy link
Contributor

@ByteYue ByteYue commented Mar 16, 2026

No description provided.

@ByteYue ByteYue marked this pull request as draft March 16, 2026 13:13
@ByteYue ByteYue force-pushed the add_download_support branch from 9cda61d to 7461e8b Compare March 18, 2026 08:27
@ByteYue ByteYue marked this pull request as ready for review March 18, 2026 08:27
@ByteYue ByteYue force-pushed the add_download_support branch from 7461e8b to 55cf8eb Compare March 18, 2026 08:53
ByteYue and others added 3 commits March 18, 2026 22:14
Add comprehensive download functionality to OpenCLI with support for
multiple platforms and content types.

- Add `src/download/index.ts`: HTTP download with progress, yt-dlp
  wrapper for video platforms, cookie export to Netscape format for
  authenticated downloads
- Add `src/download/progress.ts`: Terminal progress bars, multi-file
  download tracker with status summary
- Add `src/pipeline/steps/download.ts`: New `download` pipeline step
  for declarative YAML pipelines

- Register `download` step in executor.ts
- Add template filters: `slugify`, `sanitize`, `ext`, `basename` for
  filename templating

- `xiaohongshu download`: Download images and videos from notes
- `bilibili download`: Download videos using yt-dlp with cookie auth
- `twitter download`: Download media from user timeline or single tweet
- `zhihu download`: Export articles to Markdown with optional image
  download

```yaml
pipeline:
  - download:
      url: ${{ item.imageUrl }}
      dir: ./downloads
      filename: ${{ item.title | sanitize }}.jpg
      concurrency: 5
      skip_existing: true
      use_ytdlp: false
      type: auto  # auto|image|video|document
```

- Concurrent downloads with configurable parallelism
- Progress bars with file size display
- Skip existing files option
- Cookie forwarding for authenticated downloads
- yt-dlp integration for video platforms (YouTube, Bilibili, Twitter)
- HTML to Markdown conversion for article export

- yt-dlp: Required for video downloads from streaming platforms
- ffmpeg: Optional for video format conversion

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add Download Support section to both README.md and README.zh-CN.md
- Document supported platforms: Xiaohongshu, Bilibili, Twitter, Zhihu
- Include prerequisites (yt-dlp installation)
- Add usage examples for all download commands
- Document the `download` pipeline step for YAML adapters
- Update built-in commands table with new `download` commands

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@jackwener jackwener force-pushed the add_download_support branch from 55cf8eb to 9727e30 Compare March 18, 2026 14:18
@jackwener jackwener merged commit 8a355df into jackwener:main Mar 18, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants