feat(base): 优化环境变量配置

This commit is contained in:
xingc
2025-02-22 11:35:19 +08:00
parent e35e97402f
commit 02ddc81c51
6 changed files with 60 additions and 18 deletions

View File

@@ -5,15 +5,25 @@
# @Author : xingc
# @Desc :
class BaseException(Exception):
class CardBookException(Exception):
pass
class SearchCardNotFound(Exception):
class ScraperError(CardBookException):
""""采集错误"""
pass
class SearchCardNotFound(ScraperError):
"""搜索卡片不存在"""
pass
class SearchCardRetry(Exception):
class SearchCardRetry(ScraperError):
"""搜索重试"""
pass
class WechatApiError(CardBookException):
"""微信开放服务调用api错误"""
pass

View File

@@ -20,9 +20,9 @@ class BaseResponse(BaseModel, Generic[T]):
class Paginated(BaseModel, Generic[T]):
list: Optional[T] = None
total: int
page: int
page_size: int
total: int = 0
page: int = 1
page_size: int = 15
class SupportPlatformType(enum.Enum):