Skip to content

Commit

Permalink
Fixing clap issues #195 (#196)
Browse files Browse the repository at this point in the history
* bugfix (195) user-agent

* bugfix (195) user-agent

* remove short names

---------

Co-authored-by: mike dupont <mike.dupont@introspector.local>
  • Loading branch information
jmikedupont2 and mike dupont authored Aug 1, 2024
1 parent c6733ff commit a4df760
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion spider_cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async fn main() {
.collect::<HashMap<&str, u32>>()
}));

match cli.user_agent {
match cli.agent {
Some(agent) => {
website.with_user_agent(Some(&agent));
}
Expand Down
6 changes: 3 additions & 3 deletions spider_cli/src/options/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ pub struct Cli {
#[clap(long)]
pub limit: Option<u32>,
/// Comma seperated string list of pages to not crawl or regex with feature enabled
#[clap(short, long)]
#[clap(long)]
pub blacklist_url: Option<String>,
/// User-Agent
#[clap(short, long)]
pub user_agent: Option<String>,
pub agent: Option<String>,
/// Crawl Budget preventing extra paths from being crawled. Use commas to split the path followed by the limit ex: "*,1" - to only allow one page.
#[clap(short = 'B', long)]
pub budget: Option<String>,
Expand All @@ -48,6 +48,6 @@ pub struct Cli {
#[clap(short, long)]
pub depth: Option<usize>,
/// Dangerously accept invalid certficates
#[clap(short, long)]
#[clap(long)]
pub accept_invalid_certs: bool,
}

0 comments on commit a4df760

Please sign in to comment.