pub async fn entry() {
    let start_time = Instant::now();
    let opts = CLI::parse();
    println!("Started");
    let task_limit = opts.task_limit;
    let (tx_output, rx_output) = mpsc::channel(task_limit);
    let (tx_selenium, rx_selenium) = mpsc::channel(task_limit);

    let output_folder = opts.output_folder.clone();
    let verbose = opts.verbose;
    let url = opts.url.clone();
    let depth = opts.depth;
    let whitelist = opts.whitelist;
    let blacklist = opts.blacklist;
    let search_words = opts.search_words;
    let timeout = opts.timeout;
    let selenium = opts.selenium;

    let output_folder_clone = output_folder.clone();

    let output_handler = tokio::spawn(async move {
        handle_output(output_folder_clone, verbose, rx_output, task_limit).await
    });

    let crawler_handler = tokio::spawn(async move {
        launch_crawler(
            url,
            depth,
            task_limit,
            tx_output,
            tx_selenium,
            whitelist,
            blacklist,
            search_words,
            timeout,
        )
        .await
    });

    let output_folder_clone = output_folder.clone();
    let selenium_handler =
        tokio::spawn(
            async move { handle_selenium(output_folder_clone, selenium, rx_selenium).await },
        );

    let returns =
        futures::future::try_join3(output_handler, crawler_handler, selenium_handler).await;

    if let Err(x) = returns {
        println!("Error : {}", x);
    }

    println!("Time Taken: {} seconds", start_time.elapsed().as_secs());
}
/// Funtion that servers as the entry point to the Command Line Tool.
/// It parses the arguments and fires off the methods.
Funtion that servers as the entry point to the Command Line Tool.
It parses the arguments and fires off the methods.
Funtion that servers as the entry point to the Command Line Tool . It parses the arguments and fires off the methods .
pub async fn entry() {
    let start_time = Instant::now();
    let opts = CLI::parse();
    println!("Started");
    let task_limit = opts.task_limit;
    let (tx_output, rx_output) = mpsc::channel(task_limit);
    let (tx_selenium, rx_selenium) = mpsc::channel(task_limit);
    let output_folder = opts.output_folder.clone();
    let verbose = opts.verbose;
    let url = opts.url.clone();
    let depth = opts.depth;
    let whitelist = opts.whitelist;
    let blacklist = opts.blacklist;
    let search_words = opts.search_words;
    let timeout = opts.timeout;
    let selenium = opts.selenium;
    let output_folder_clone = output_folder.clone();
    let output_handler = tokio::spawn(async move {
        handle_output(output_folder_clone, verbose, rx_output, task_limit).await
    });
    let crawler_handler = tokio::spawn(async move {
        launch_crawler(
            url,
            depth,
            task_limit,
            tx_output,
            tx_selenium,
            whitelist,
            blacklist,
            search_words,
            timeout,
        )
        .await
    });
    let output_folder_clone = output_folder.clone();
    let selenium_handler =
        tokio::spawn(
            async move { handle_selenium(output_folder_clone, selenium, rx_selenium).await },
        );
    let returns =
        futures::future::try_join3(output_handler, crawler_handler, selenium_handler).await;
    if let Err(x) = returns {
        println!("Error : {}", x);
    }
    println!("Time Taken: {} seconds", start_time.elapsed().as_secs());
}
pub async fn entry ( ) { let start_time = Instant :: now ( ) ; let opts = CLI :: parse ( ) ; println ! ( " " ) ; let task_limit = opts . task_limit ; let ( tx_output , rx_output ) = mpsc :: channel ( task_limit ) ; let ( tx_selenium , rx_selenium ) = mpsc :: channel ( task_limit ) ; let output_folder = opts . output_folder . clone ( ) ; let verbose = opts . verbose ; let url = opts . url . clone ( ) ; let depth = opts . depth ; let whitelist = opts . whitelist ; let blacklist = opts . blacklist ; let search_words = opts . search_words ; let timeout = opts . timeout ; let selenium = opts . selenium ; let output_folder_clone = output_folder . clone ( ) ; let output_handler = tokio :: spawn ( async move { handle_output ( output_folder_clone , verbose , rx_output , task_limit ) . await } ) ; let crawler_handler = tokio :: spawn ( async move { launch_crawler ( url , depth , task_limit , tx_output , tx_selenium , whitelist , blacklist , search_words , timeout , ) . await } ) ; let output_folder_clone = output_folder . clone ( ) ; let selenium_handler = tokio :: spawn ( async move { handle_selenium ( output_folder_clone , selenium , rx_selenium ) . await } , ) ; let returns = futures :: future :: try_join3 ( output_handler , crawler_handler , selenium_handler ) . await ; if let Err ( x ) = returns { println ! ( " " x ) ; } println ! ( " " start_time elapsed ( ) as_secs ( ) ) ; }
Funtion that servers as the entry point to the Command Line Tool.
Funtion that servers as the entry point to the Command Line Tool .