scraprr 0.1.3

A Rust web scraping library for Python
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use scraprr::prelude::*;

#[test]
fn test_fetch_url() {
    let text = fetch_url("https://google.com/").unwrap();
    println!("Response body: {}", text);

    let title = extract_tag(&text, "title").unwrap();
    println!("Extracted title: {:?}", title);

    assert!(!title.is_empty(), "Title should not be empty");
}