Skip to content

Commit df02926

Browse files
committed
fix: mikan poster problem.
1 parent 1631605 commit df02926

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

backend/src/module/parser/analyser/mikan_parser.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,14 @@ def mikan_parser(homepage: str):
1919
official_title = re.sub(r"第.*季", "", official_title).strip()
2020
if poster_div:
2121
poster_path = poster_div.split("url('")[1].split("')")[0]
22+
poster_path = poster_path.split("?")[0]
2223
img = req.get_content(f"https://{root_path}{poster_path}")
2324
suffix = poster_path.split(".")[-1]
2425
poster_link = save_image(img, suffix)
2526
return poster_link, official_title
2627
return "", ""
28+
29+
30+
if __name__ == '__main__':
31+
homepage = "https://mikanani.me/Home/Episode/c89b3c6f0c1c0567a618f5288b853823c87a9862"
32+
print(mikan_parser(homepage))

0 commit comments

Comments
 (0)