From 1257ccb1aff7dd077660058e8a741e99b05df7bd Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 16 Aug 2022 15:56:41 +0200 Subject: [PATCH] bypass ratelimit --- src/info.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/info.rs b/src/info.rs index 37df4a5..4c9ad92 100644 --- a/src/info.rs +++ b/src/info.rs @@ -60,7 +60,9 @@ pub async fn info() -> HashMap, i64)>> { /// Get info webpage async fn get_webpage() -> Result> { let url = "https://informatique.up8.edu/licence-iv/edt"; - let html = reqwest::get(url).await?.text().await?; + + let client = reqwest::Client::builder().user_agent("bypass-rate_limit").build()?; + let html = client.get(url).send().await?.text().await?; // Panic on error crate::utils::check_errors(&html, url);