Add a location option to the program, for using with other canteens than the one in N58 #1
|
@ -50,7 +50,7 @@ pub(crate) fn get_cached_or_fetch_data(location: &str, now: DateTime<Utc>) -> an
|
||||||
items: ureq::get(&format!("{}?lokasjon={}&dato=", MENU_URL, location)).call()?
|
items: ureq::get(&format!("{}?lokasjon={}&dato=", MENU_URL, location)).call()?
|
||||||
.into_string()?
|
.into_string()?
|
||||||
.html_string_to_vec()?,
|
.html_string_to_vec()?,
|
||||||
soup_items: ureq::get(&format!("{}?lokasjon={}&dato=",MENU_URL, location)).call()?
|
soup_items: ureq::get(&format!("{}?lokasjon={}&dato=",SOUP_URL, location)).call()?
|
||||||
.into_string()?
|
.into_string()?
|
||||||
.html_string_to_vec()?,
|
.html_string_to_vec()?,
|
||||||
};
|
};
|
||||||
|
@ -67,7 +67,7 @@ pub(crate) fn get_cached_or_fetch_data(location: &str, now: DateTime<Utc>) -> an
|
||||||
items: ureq::get(&format!("{}?lokasjon={}&dato=", MENU_URL, location)).call()?
|
items: ureq::get(&format!("{}?lokasjon={}&dato=", MENU_URL, location)).call()?
|
||||||
.into_string()?
|
.into_string()?
|
||||||
.html_string_to_vec()?,
|
.html_string_to_vec()?,
|
||||||
soup_items: ureq::get(&format!("{}?lokasjon={}&dato=",MENU_URL, location)).call()?
|
soup_items: ureq::get(&format!("{}?lokasjon={}&dato=",SOUP_URL, location)).call()?
|
||||||
.into_string()?
|
.into_string()?
|
||||||
.html_string_to_vec()?,
|
.html_string_to_vec()?,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue