forked from Anri/cal8tor
add comments
This commit is contained in:
parent
1257ccb1af
commit
0e2ca5bcd1
1 changed files with 5 additions and 1 deletions
|
@ -61,7 +61,11 @@ pub async fn info() -> HashMap<usize, Vec<(DateTime<Utc>, i64)>> {
|
||||||
async fn get_webpage() -> Result<Html, Box<dyn std::error::Error>> {
|
async fn get_webpage() -> Result<Html, Box<dyn std::error::Error>> {
|
||||||
let url = "https://informatique.up8.edu/licence-iv/edt";
|
let url = "https://informatique.up8.edu/licence-iv/edt";
|
||||||
|
|
||||||
let client = reqwest::Client::builder().user_agent("bypass-rate_limit").build()?;
|
// We don't use reqwest::get() but a client with a custom user-agent
|
||||||
|
// in order to avoid getting rate limit
|
||||||
|
let client = reqwest::Client::builder()
|
||||||
|
.user_agent("bypass-rate_limit")
|
||||||
|
.build()?;
|
||||||
let html = client.get(url).send().await?.text().await?;
|
let html = client.get(url).send().await?.text().await?;
|
||||||
|
|
||||||
// Panic on error
|
// Panic on error
|
||||||
|
|
Loading…
Reference in a new issue