I am very new to rust and I want to write a script to scrape a page and pull all the links from it with their titles. I have failed to even make the get request. :(
fn main() {
println!("Started!");
let body = reqwest::get("https://news.ycombinator.com")
.await?
.text()
.await?;
println!("body = {:?}", body);
}
I am clearly not returning anything however I am confused with the syntax can someone explain the ? operator and also help me fix this issue.