Did more refacroring and made a better loop for anime as well as error handeling in anime

This commit is contained in:
Zastian Pretorius
2022-07-10 22:34:05 +01:00
parent 361a787f93
commit db1ab32120
9 changed files with 108 additions and 72 deletions

View File

@@ -66,7 +66,7 @@ pub fn anime_ep_range(anime_name: &str) -> u16 {
.unwrap_or(0)
}
pub fn anime_link(title: &str, ep: u16) -> (String, String) {
pub fn anime_link(title: &str, ep: u64) -> (String, String) {
let url = format!("https://animixplay.to/v1/{}", title);
let html = get_anime_html(&url);
let re = Regex::new(r#"(?m)\?id=([^&]+)"#).unwrap();