rusty-scrap

Crates.iorusty-scrap
lib.rsrusty-scrap
version0.1.9
sourcesrc
created_at2024-12-04 07:35:34.869431
updated_at2024-12-09 14:11:16.310482
descriptionHTML Scrapper
homepage
repository
max_upload_size
id1471593
size14,768
Hariprasath (HashiramaSenjuhari)

documentation

README

Scraper using Scrap

This project uses the rusty-scrap crate in Rust to scrape data from Wikipedia pages. Specifically, it targets the page.

Usage

This script scrapes the text content of elements from the specified URL.

Dependencies:

Ensure you have Rust and Cargo installed. Then, add the scrap crate to your Cargo.toml file:

[dependencies]
rusty-scrap = "0.3"

Run the script:

  1. Save the following code as main.rs:
use rusty-scrap::{Scrap};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let response = Scrap::new()
        .url("https://en.wikipedia.org/wiki/Bill_Gates")
        .build()
        .element_values();

    Ok(())
}
  1. Compile and run using Cargo:
cargo run
Commit count: 0

cargo fmt