google_search_rs 0.1.0

A crate for scraping Google search results using headless Chrome.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use google_search_rs::search;
use std::error::Error;

fn main() -> Result<(), Box<dyn Error>> {
    // Example search query
    let search_query = "Python Programming Language";
    let max_pages = 10;
    // Call the scraping function with the search query and an optional save path
    // let df = search(search_query,max_pages,None)?;
    let df = search(search_query,max_pages,Some("results.csv"))?;
    println!("{:?}",df);
    Ok(())
}