mirror of
https://github.com/PaiGramTeam/HonkaiStarRailWikiDataParser.git
synced 2024-11-15 22:19:19 +00:00
✨ support: avatar icon
This commit is contained in:
parent
d0fbf902b7
commit
2633e09bb9
@ -27,6 +27,7 @@ async def fetch_avatars(data: Children):
|
|||||||
avatar = Avatar(
|
avatar = Avatar(
|
||||||
id=content.content_id,
|
id=content.content_id,
|
||||||
name=content.title,
|
name=content.title,
|
||||||
|
icon=content.icon,
|
||||||
quality=m_quality,
|
quality=m_quality,
|
||||||
element=m_element,
|
element=m_element,
|
||||||
destiny=m_destiny,
|
destiny=m_destiny,
|
||||||
|
@ -44,6 +44,8 @@ class Avatar(BaseModel):
|
|||||||
"""角色ID"""
|
"""角色ID"""
|
||||||
name: str
|
name: str
|
||||||
"""名称"""
|
"""名称"""
|
||||||
|
icon: str
|
||||||
|
"""图标"""
|
||||||
quality: Quality
|
quality: Quality
|
||||||
"""品质"""
|
"""品质"""
|
||||||
destiny: Destiny
|
destiny: Destiny
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
from aenum import StrEnum
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
class Quality(StrEnum):
|
class Quality(str, Enum):
|
||||||
""" 星级 """
|
""" 星级 """
|
||||||
Five = "五星"
|
Five = "五星"
|
||||||
Four = "四星"
|
Four = "四星"
|
||||||
@ -10,7 +10,7 @@ class Quality(StrEnum):
|
|||||||
One = "一星"
|
One = "一星"
|
||||||
|
|
||||||
|
|
||||||
class Destiny(StrEnum):
|
class Destiny(str, Enum):
|
||||||
""" 命途 """
|
""" 命途 """
|
||||||
HuiMie = "毁灭"
|
HuiMie = "毁灭"
|
||||||
ZhiShi = "智识"
|
ZhiShi = "智识"
|
||||||
@ -21,7 +21,7 @@ class Destiny(StrEnum):
|
|||||||
XuWu = "虚无"
|
XuWu = "虚无"
|
||||||
|
|
||||||
|
|
||||||
class Element(StrEnum):
|
class Element(str, Enum):
|
||||||
""" 属性 """
|
""" 属性 """
|
||||||
Physical = "物理"
|
Physical = "物理"
|
||||||
Pyro = "火"
|
Pyro = "火"
|
||||||
@ -34,7 +34,7 @@ class Element(StrEnum):
|
|||||||
"""无"""
|
"""无"""
|
||||||
|
|
||||||
|
|
||||||
class MonsterType(StrEnum):
|
class MonsterType(str, Enum):
|
||||||
""" 怪物种类 """
|
""" 怪物种类 """
|
||||||
Normal = "普通"
|
Normal = "普通"
|
||||||
Elite = "精英"
|
Elite = "精英"
|
||||||
@ -42,7 +42,7 @@ class MonsterType(StrEnum):
|
|||||||
Boss = "历战余响"
|
Boss = "历战余响"
|
||||||
|
|
||||||
|
|
||||||
class Area(StrEnum):
|
class Area(str, Enum):
|
||||||
""" 地区 """
|
""" 地区 """
|
||||||
Herta = "空间站「黑塔」"
|
Herta = "空间站「黑塔」"
|
||||||
YaLiLuo = "雅利洛-VI"
|
YaLiLuo = "雅利洛-VI"
|
||||||
@ -50,7 +50,7 @@ class Area(StrEnum):
|
|||||||
NULL = "未知"
|
NULL = "未知"
|
||||||
|
|
||||||
|
|
||||||
class MaterialType(StrEnum):
|
class MaterialType(str, Enum):
|
||||||
""" 材料类型 """
|
""" 材料类型 """
|
||||||
AvatarUpdate = "角色晋阶材料"
|
AvatarUpdate = "角色晋阶材料"
|
||||||
XingJi = "行迹材料"
|
XingJi = "行迹材料"
|
||||||
@ -65,7 +65,7 @@ class MaterialType(StrEnum):
|
|||||||
Other = "其他材料"
|
Other = "其他材料"
|
||||||
|
|
||||||
|
|
||||||
class PropType(StrEnum):
|
class PropType(str, Enum):
|
||||||
""" 遗器套装效果 """
|
""" 遗器套装效果 """
|
||||||
HP = "基础-生命值"
|
HP = "基础-生命值"
|
||||||
Defense = "基础-防御力"
|
Defense = "基础-防御力"
|
||||||
|
15
poetry.lock
generated
15
poetry.lock
generated
@ -1,18 +1,5 @@
|
|||||||
# This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand.
|
# This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand.
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "aenum"
|
|
||||||
version = "3.1.12"
|
|
||||||
description = "Advanced Enumerations (compatible with Python's stdlib Enum), NamedTuples, and NamedConstants"
|
|
||||||
category = "main"
|
|
||||||
optional = false
|
|
||||||
python-versions = "*"
|
|
||||||
files = [
|
|
||||||
{file = "aenum-3.1.12-py2-none-any.whl", hash = "sha256:8d79c9e3ec997220e355b96b322e672fb56a53e61744138ed838407e3a07b610"},
|
|
||||||
{file = "aenum-3.1.12-py3-none-any.whl", hash = "sha256:2d544ef7323c088d68abf9a84b9f3f6db0d516fec685e15678b5f84fdb7b8ba0"},
|
|
||||||
{file = "aenum-3.1.12.tar.gz", hash = "sha256:3e531c91860a81f885f7e6e97d219ae9772cb899580084788935dad7d9742ef0"},
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "aiofiles"
|
name = "aiofiles"
|
||||||
version = "23.1.0"
|
version = "23.1.0"
|
||||||
@ -487,4 +474,4 @@ files = [
|
|||||||
[metadata]
|
[metadata]
|
||||||
lock-version = "2.0"
|
lock-version = "2.0"
|
||||||
python-versions = "^3.8"
|
python-versions = "^3.8"
|
||||||
content-hash = "728bb8f13eb465e9b8068848bd66dae954aad973ea5a0251c94f5c5b24da368f"
|
content-hash = "0926fcee48a71f00e0e7494eb137b6cbe1c0be447a2ad558a7a20c9e72d490c6"
|
||||||
|
@ -13,7 +13,6 @@ aiofiles = "^23.1.0"
|
|||||||
ujson = "^5.7.0"
|
ujson = "^5.7.0"
|
||||||
pydantic = "^1.10.7"
|
pydantic = "^1.10.7"
|
||||||
beautifulsoup4 = "^4.12.2"
|
beautifulsoup4 = "^4.12.2"
|
||||||
aenum = "^3.1.12"
|
|
||||||
lxml = "^4.9.2"
|
lxml = "^4.9.2"
|
||||||
pillow = "^9.5.0"
|
pillow = "^9.5.0"
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
aenum==3.1.12 ; python_version >= "3.8" and python_version < "4.0"
|
|
||||||
aiofiles==23.1.0 ; python_version >= "3.8" and python_version < "4.0"
|
aiofiles==23.1.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||||
anyio==3.6.2 ; python_version >= "3.8" and python_version < "4.0"
|
anyio==3.6.2 ; python_version >= "3.8" and python_version < "4.0"
|
||||||
beautifulsoup4==4.12.2 ; python_version >= "3.8" and python_version < "4.0"
|
beautifulsoup4==4.12.2 ; python_version >= "3.8" and python_version < "4.0"
|
||||||
|
Loading…
Reference in New Issue
Block a user