From ee82a26e76355afde74bcbc40d3b825fa935a206 Mon Sep 17 00:00:00 2001 From: "karl.hudgell" Date: Tue, 21 Jun 2022 12:22:59 +0100 Subject: [PATCH] handle special characters in show name --- backend.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend.py b/backend.py index 8fe500d..b852d71 100644 --- a/backend.py +++ b/backend.py @@ -233,8 +233,9 @@ class gogoanime: else: fullRow = fullRow.replace("Status ", "") splitRow = fullRow.split("Latest") - animeName = splitRow[0].strip() - animeDownloadName = animeName.replace(":", "").replace(" ", "-").lower() + animeName = splitRow[0].strip().encode("ascii", "ignore").decode() + animeName = re.sub("[^A-Za-z0-9 ]+", "", animeName) + animeDownloadName = animeName.replace(" ", "-").lower() episodeNum = splitRow[-1].split()[-1] bookmarkList.append( {