Compare commits

..
3 Commits
Author SHA1 Message Date
YoursFunny b83bed5423 fix pixiv exception import 2026-06-23 23:24:39 +08:00
YoursFunny 0f3131aec7 bump deps version 2026-06-23 23:16:57 +08:00
YoursFunny 5483855de8 fix webhook set as false in compose yaml 2025-12-18 14:59:12 +08:00
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ ADMIN = [int(i) for i in os.getenv("BOT_ADMIN", "").split(",") if i]
PIXIV_REFRESH_TOKEN = os.getenv("PIXIV_REFRESH_TOKEN") PIXIV_REFRESH_TOKEN = os.getenv("PIXIV_REFRESH_TOKEN")
WEBHOOK = os.getenv("WEBHOOK", False) WEBHOOK = os.getenv("WEBHOOK").strip().lower() in ("true", "yes", "1")
if WEBHOOK: if WEBHOOK:
WEBHOOK_LISTEN = os.getenv("WEBHOOK_LISTEN", "0.0.0.0") WEBHOOK_LISTEN = os.getenv("WEBHOOK_LISTEN", "0.0.0.0")
WEBHOOK_PORT = int(os.getenv("WEBHOOK_PORT", 8443)) WEBHOOK_PORT = int(os.getenv("WEBHOOK_PORT", 8443))
+2 -2
View File
@@ -1,4 +1,4 @@
python-telegram-bot[webhooks]~=22.5 python-telegram-bot[webhooks]~=22.8
httpx[http2]~=0.27 httpx[http2]~=0.27
uvloop~=0.22; sys_platform != 'win32' uvloop~=0.22; sys_platform != 'win32'
async-pixiv @ git+https://github.com/TheFunny/async-pixiv@main async-pixiv~=1.1.2
+2 -2
View File
@@ -3,7 +3,7 @@ from __future__ import annotations
from typing import Literal, TYPE_CHECKING from typing import Literal, TYPE_CHECKING
from async_pixiv import PixivClient from async_pixiv import PixivClient
from async_pixiv.error import ApiError from async_pixiv.error import APIError
if TYPE_CHECKING: if TYPE_CHECKING:
from async_pixiv.model.illust import Illust from async_pixiv.model.illust import Illust
@@ -133,7 +133,7 @@ class ProcessPixiv(_ProcessPixiv):
illust_id = self._parse_illust_id() illust_id = self._parse_illust_id()
try: try:
return (await self._client.ILLUST.detail(illust_id)).illust return (await self._client.ILLUST.detail(illust_id)).illust
except ApiError: except APIError:
await self.refresh_token() await self.refresh_token()
return (await self._client.ILLUST.detail(illust_id)).illust # TODO use retry here return (await self._client.ILLUST.detail(illust_id)).illust # TODO use retry here