Skip to content

CLI: add --user-agent option - #884

Open
timppeters wants to merge 1 commit into
obsidianmd:mainfrom
timppeters:cli-user-agent
Open

CLI: add --user-agent option#884
timppeters wants to merge 1 commit into
obsidianmd:mainfrom
timppeters:cli-user-agent

Conversation

@timppeters

Copy link
Copy Markdown

Summary

Some sites return 403 or empty bodies to the default Node/Bun fetch User-Agent, which makes CLI clips of those sites fail or come back blank.

This adds a --user-agent <string> option whose value is sent as the User-Agent header when the CLI fetches the URL. When the flag is omitted, nothing is set and the runtime's default applies.

obsidian-clipper https://example.com -t template.json --user-agent "Mozilla/5.0 ..."

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