diff --git a/py34/post.py b/py34/post.py index b7adc8a..285119b 100644 --- a/py34/post.py +++ b/py34/post.py @@ -7,9 +7,9 @@ from PIL.ImageFile import ImageFile class Post: def __init__(self, id: int, image_dir: int, image_id: str, tags: list[str]): - self.id: int = id - self.image_dir: int = image_dir - self.image_id: str = image_id + self.id: int = int(id) + self.image_dir: int = int(image_dir) + self.image_id: str = str(image_id) self.tags: list[str] = tags.copy() self.thumbnail_data: bytes = scraper.get(f"https://wimg.rule34.xxx/thumbnails/{self.image_dir}/thumbnail_{self.image_id}.jpg") self.thumbnail: ImageFile = Image.open(BytesIO(self.thumbnail_data)) diff --git a/py34/view.py b/py34/view.py index e9d2728..d37ebf7 100644 --- a/py34/view.py +++ b/py34/view.py @@ -34,7 +34,7 @@ class ViewTags: class View: def __init__(self, id: int): - self.id = id + self.id = int(id) self._image_data: bytes | None = None self._image: ImageFile | None = None self._image_url: ImageURL | None = None