Skip to content

Commit be6f5a3

Browse files
factorydroidechobt
authored andcommitted
fix(cli): add common user agent examples to scrape --user-agent help
Fixes bounty issue #1410 The --user-agent flag help text was too minimal ('Custom user agent string') without providing any guidance on common values. Added examples of Chrome, Googlebot, and curl user agents to help users understand common options.
1 parent df08b35 commit be6f5a3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cortex-cli/src/scrape_cmd.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ pub struct ScrapeCommand {
5656
pub timeout: u64,
5757

5858
/// Custom user agent string.
59-
#[arg(long)]
59+
///
60+
/// Common examples:
61+
/// - Chrome (default): 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/120.0.0.0'
62+
/// - Googlebot: 'Googlebot/2.1 (+http://www.google.com/bot.html)'
63+
/// - curl: 'curl/8.0.0'
64+
#[arg(long, value_name = "USER_AGENT")]
6065
pub user_agent: Option<String>,
6166

6267
/// Custom headers (format: "Header-Name: value").

0 commit comments

Comments
 (0)