feat:Alipan Open Api

This commit is contained in:
jxxghp
2025-03-28 13:40:29 +08:00
parent c5e84273c0
commit b8cd1c46c1
3 changed files with 766 additions and 348 deletions

View File

@@ -111,6 +111,8 @@ class ConfigModel(BaseModel):
FANART_API_KEY: str = "d2d31f9ecabea050fc7d68aa3146015f"
# 115 AppId
U115_APP_ID: str = "100196807"
# Alipan AppId
ALIPAN_APP_ID: str = "ac1bf04dc9fd4d9aaabb65b4a668d403"
# 元数据识别缓存过期时间(小时)
META_CACHE_EXPIRE: int = 0
# 电视剧动漫的分类genre_ids

File diff suppressed because it is too large Load Diff

View File

@@ -166,7 +166,7 @@ class U115Pan(StorageBase, metaclass=Singleton):
确认登录后获取相关token
"""
if not self._auth_state:
raise Exception("【115】请先调用生成二维码方法")
raise Exception("请先生成二维码")
resp = self.session.post(
"https://passportapi.115.com/open/deviceCodeToToken",
data={
@@ -175,7 +175,7 @@ class U115Pan(StorageBase, metaclass=Singleton):
}
)
if resp is None:
raise Exception("【115】获取 access_token 失败")
raise Exception("获取 access_token 失败")
result = resp.json()
if result.get("code") != 0:
raise Exception(result.get("message"))