mirror of
https://github.com/TheFunny/TelegramTwitterMediaBot.git
synced 2026-09-23 23:32:05 +00:00
fix changes of updated async-pixiv module
This commit is contained in:
+6
-6
@@ -73,27 +73,27 @@ class Pixiv:
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def is_nsfw(self) -> bool:
|
def is_nsfw(self) -> bool:
|
||||||
return self._illust.is_nsfw
|
return self._illust.sanity_level > 5
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_ai(self) -> bool:
|
def is_ai(self) -> bool:
|
||||||
return self._illust.ai_type.value == 2
|
return self._illust.ai_type == 2
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def images(self) -> list[PixivMedia]:
|
def images(self) -> list[PixivMedia]:
|
||||||
if self.is_multiple_pages:
|
if self.is_multiple_pages:
|
||||||
return [
|
return [
|
||||||
PixivMedia(
|
PixivMedia(
|
||||||
url=page.image_urls.original,
|
url=str(page.image_urls.original),
|
||||||
thumb=page.image_urls.medium
|
thumb=str(page.image_urls.medium)
|
||||||
)
|
)
|
||||||
for page in self._illust.meta_pages
|
for page in self._illust.meta_pages
|
||||||
]
|
]
|
||||||
else:
|
else:
|
||||||
return [
|
return [
|
||||||
PixivMedia( # should observe if image_url.original is always None for single page
|
PixivMedia( # should observe if image_url.original is always None for single page
|
||||||
url=self._illust.image_urls.original or self._illust.meta_single_page.original,
|
url=str(self._illust.image_urls.original or self._illust.meta_single_page.original),
|
||||||
thumb=self._illust.image_urls.medium
|
thumb=str(self._illust.image_urls.medium)
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user