From df0292672c48c3e5b4e6bbb8449a1c9fe633ca8c Mon Sep 17 00:00:00 2001 From: EstrellaXD Date: Tue, 9 Jan 2024 15:25:16 +0800 Subject: [PATCH] fix: mikan poster problem. --- backend/src/module/parser/analyser/mikan_parser.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/src/module/parser/analyser/mikan_parser.py b/backend/src/module/parser/analyser/mikan_parser.py index a623ec754..cf49c100a 100644 --- a/backend/src/module/parser/analyser/mikan_parser.py +++ b/backend/src/module/parser/analyser/mikan_parser.py @@ -19,8 +19,14 @@ def mikan_parser(homepage: str): official_title = re.sub(r"第.*季", "", official_title).strip() if poster_div: poster_path = poster_div.split("url('")[1].split("')")[0] + poster_path = poster_path.split("?")[0] img = req.get_content(f"https://{root_path}{poster_path}") suffix = poster_path.split(".")[-1] poster_link = save_image(img, suffix) return poster_link, official_title return "", "" + + +if __name__ == '__main__': + homepage = "https://mikanani.me/Home/Episode/c89b3c6f0c1c0567a618f5288b853823c87a9862" + print(mikan_parser(homepage))