9 releases

new 0.1.9 Dec 9, 2024
0.1.8 Dec 8, 2024

#1663 in Web programming

Download history 97/week @ 2024-11-28 484/week @ 2024-12-05

581 downloads per month
Used in 2 crates (via gemini-ai)

MIT license

9KB
147 lines

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

Dependencies

~2–12MB
~143K SLoC