Skip to content

Commit

Permalink
fix: Kemono thumbnail 404 error (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
orilights authored Jan 21, 2024
1 parent 45d1759 commit 0d945b0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nazurin/sites/kemono/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async def fetch(self, service: str, user_id: str, post_id: str) -> Illust:
image_index = 0
for file in files:
path: str = file["path"]
url = "https://c1.kemono.party/data" + path
url = "https://c1.kemono.su/data" + path

# Handle non-image files
if not self.is_image(path):
Expand All @@ -72,7 +72,7 @@ async def fetch(self, service: str, user_id: str, post_id: str) -> Illust:
destination, filename = self.get_storage_dest(
post, f"{image_index} - {file['name']}", path
)
thumbnail = "https://img.kemono.party/thumbnail/data" + path
thumbnail = "https://img.kemono.su/thumbnail/data" + path
images.append(
Image(
filename,
Expand Down Expand Up @@ -120,7 +120,7 @@ def build_caption(post) -> Caption:
"title": post["title"],
"author": "#" + post["username"],
"url": (
f"https://kemono.party/{post['service']}"
f"https://kemono.su/{post['service']}"
f"/user/{post['user']}/post/{post['id']}"
),
}
Expand Down

0 comments on commit 0d945b0

Please sign in to comment.