Skip to content

fix: impersonate Chrome for Bandcamp downloads - #94

Merged
D3SOX merged 2 commits into
masterfrom
fix-bandcamp-impersonation
Aug 4, 2026
Merged

fix: impersonate Chrome for Bandcamp downloads#94
D3SOX merged 2 commits into
masterfrom
fix-bandcamp-impersonation

Conversation

@D3SOX

@D3SOX D3SOX commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • pass --impersonate chrome to Bandcamp track downloads
  • use the same impersonation arguments when resolving Bandcamp album metadata
  • document the workaround for yt-dlp issue #17356

Why

Bandcamp may return a client-challenge page to yt-dlp instead of track or album metadata. Chrome impersonation works around that response so Bandcamp downloads can proceed.

Validation

  • bun test src/ytdlp.test.ts
  • bun run lint

Summary by CodeRabbit

  • Bug Fixes

    • Improved Bandcamp URL handling for metadata lookups and audio downloads.
    • Enhanced compatibility with sites requiring Chrome-like browser identification.
    • Preserved existing SoundCloud format selection, cookie handling, progress reporting, and output processing.
  • Documentation

    • Updated prerequisites with installation guidance for the optional curl_cffi backend required for Bandcamp support.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 75eee7cb-3c5d-412f-b244-34202f0df40f

📥 Commits

Reviewing files that changed from the base of the PR and between a8b8837 and 5800e3c.

📒 Files selected for processing (1)
  • README.md

📝 Walkthrough

Walkthrough

The yt-dlp integration detects Bandcamp URLs and applies Chrome impersonation arguments to audio download and album metadata commands. The README documents the optional curl_cffi backend required for Bandcamp support.

Changes

Bandcamp yt-dlp support

Layer / File(s) Summary
Bandcamp detection and command arguments
src/ytdlp.ts
The module imports isBandcampUrl and defines Chrome impersonation arguments for Bandcamp requests.
Bandcamp metadata, download, and setup documentation
src/ytdlp.ts, README.md
Bandcamp download and album metadata commands prepend the impersonation arguments. SoundCloud-specific format selection remains unchanged. The prerequisites document curl_cffi installation options.ため

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: using Chrome impersonation for Bandcamp downloads.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-bandcamp-impersonation

Comment @coderabbitai help to get the list of available commands.

@D3SOX
D3SOX marked this pull request as ready for review August 4, 2026 20:27

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/ytdlp.ts`:
- Around line 34-35: Ensure the yt-dlp installation used by the project provides
Chrome impersonation support, including the optional curl-cffi backend required
by BANDCAMP_IMPERSONATION_ARGS. Pin a compatible yt-dlp/curl-cffi setup or add a
capability check that detects unavailable support and handles it before Bandcamp
metadata or download commands run.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 05fd2ba7-3b79-471c-b150-d5b904a40559

📥 Commits

Reviewing files that changed from the base of the PR and between b32599f and a8b8837.

📒 Files selected for processing (1)
  • src/ytdlp.ts

Comment thread src/ytdlp.ts
@D3SOX
D3SOX merged commit 589c7c7 into master Aug 4, 2026
2 checks passed
@D3SOX
D3SOX deleted the fix-bandcamp-impersonation branch August 5, 2026 10:57
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.

1 participant