From b83bed5423bcad94f552838a7040200038dea87a Mon Sep 17 00:00:00 2001 From: YoursFunny Date: Tue, 23 Jun 2026 23:24:39 +0800 Subject: [PATCH] fix pixiv exception import --- utils/pixiv.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/pixiv.py b/utils/pixiv.py index bd18a35..51b5721 100644 --- a/utils/pixiv.py +++ b/utils/pixiv.py @@ -3,7 +3,7 @@ from __future__ import annotations from typing import Literal, TYPE_CHECKING from async_pixiv import PixivClient -from async_pixiv.error import ApiError +from async_pixiv.error import APIError if TYPE_CHECKING: from async_pixiv.model.illust import Illust @@ -133,7 +133,7 @@ class ProcessPixiv(_ProcessPixiv): illust_id = self._parse_illust_id() try: return (await self._client.ILLUST.detail(illust_id)).illust - except ApiError: + except APIError: await self.refresh_token() return (await self._client.ILLUST.detail(illust_id)).illust # TODO use retry here