9 releases
new 0.1.9 | Dec 9, 2024 |
---|---|
0.1.8 | Dec 8, 2024 |
#1663 in Web programming
581 downloads per month
Used in 2 crates
(via gemini-ai)
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:
- 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(())
}
- Compile and run using Cargo:
cargo run
Dependencies
~2–12MB
~143K SLoC