Skip to content

Commit

Permalink
fix: mikan poster problem.
Browse files Browse the repository at this point in the history
  • Loading branch information
EstrellaXD committed Jan 9, 2024
1 parent 1631605 commit df02926
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions backend/src/module/parser/analyser/mikan_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

0 comments on commit df02926

Please sign in to comment.