Skip to content

Commit 403f708

Browse files
factorydroidechobt
authored andcommitted
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 be6f5a3 commit 403f708

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cortex-cli/src/scrape_cmd.rs

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

7979
/// CSS selector to extract specific content.
80+
///
81+
/// Examples:
82+
/// - 'div.main' - Select divs with class "main"
83+
/// - '#content' - Select element with id "content"
84+
/// - 'article p' - Select all paragraphs inside articles
85+
/// - 'h1, h2, h3' - Select all h1, h2, and h3 headings
86+
/// - '.post-content' - Select elements with class "post-content"
8087
#[arg(long, value_name = "SELECTOR")]
8188
pub selector: Option<String>,
8289

0 commit comments

Comments
 (0)