Skip to content

Commit f9c5be6

Browse files
committed
fix(cli): add CSS selector examples to scrape --selector help text
Fixes bounty issue #1378 The --selector flag for the scrape command now includes practical examples of common CSS selectors, making it easier for users unfamiliar with CSS to understand how to use the flag effectively.
1 parent 771ba8f commit f9c5be6

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

cortex-cli/src/scrape_cmd.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,13 @@ pub struct ScrapeCommand {
7272
pub no_links: bool,
7373

7474
/// CSS selector to extract specific content.
75+
///
76+
/// Examples:
77+
/// - 'div.main' - Select divs with class "main"
78+
/// - '#content' - Select element with id "content"
79+
/// - 'article p' - Select all paragraphs inside articles
80+
/// - 'h1, h2, h3' - Select all h1, h2, and h3 headings
81+
/// - '.post-content' - Select elements with class "post-content"
7582
#[arg(long, value_name = "SELECTOR")]
7683
pub selector: Option<String>,
7784

0 commit comments

Comments
 (0)