Skip to content

Instantly share code, notes, and snippets.

@oldtune
Created June 15, 2023 08:27
Show Gist options
  • Save oldtune/45000b774e55057c776fbc02bd279b49 to your computer and use it in GitHub Desktop.
Save oldtune/45000b774e55057c776fbc02bd279b49 to your computer and use it in GitHub Desktop.
crawler main.rs 2
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let http_client = build_http_client()?;
//we are searching for the word "access" here.
let html = http_client.get("http://tratu.coviet.vn/hoc-tieng-anh/tu-dien/lac-viet/A-V/access.html")
.send().await?
.text_with_charset("utf-8").await?;
dbg!(html);
Ok(())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment