diff --git a/Cargo.lock b/Cargo.lock index 214736e..f5d2c0c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -330,7 +330,7 @@ dependencies = [ [[package]] name = "mangafetchi" -version = "0.1.1" +version = "0.1.2" dependencies = [ "quick-xml", "reqwest", diff --git a/Cargo.toml b/Cargo.toml index ce20ee5..33386c4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mangafetchi" -version = "0.1.1" +version = "0.1.2" authors = ["blank X "] edition = "2018" diff --git a/src/utils.rs b/src/utils.rs index cd00482..bdf0b77 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -204,11 +204,11 @@ fn parse_manganelo_manga(text: &str, manga_id: &str) -> structs::MangaOption { if name.is_none() && is_inside_h1 { name = Some(text); } else if is_inside_authors && is_inside_td && is_inside_a { - authors.push(text); + authors.push(text.trim().to_string()); } else if is_inside_status && is_inside_td { status = Some(text); } else if is_inside_genres && is_inside_td && is_inside_a { - genres.push(text); + genres.push(text.trim().to_string()); } else if last_updated.is_none() && is_inside_stre_value { last_updated = Some(text); } else if is_inside_description && !is_inside_h3 { @@ -364,9 +364,9 @@ fn parse_mangakakalot_manga(text: &str, manga_id: &str) -> structs::MangaOption if is_inside_h1 { name = Some(text); } else if is_inside_authors && is_inside_a { - authors.push(text); + authors.push(text.trim().to_string()); } else if is_inside_genres && is_inside_a { - genres.push(text); + genres.push(text.trim().to_string()); } else { match text.splitn(2, ' ').nth(0).unwrap() { "Author(s)" => is_inside_authors = true,