mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-16 04:35:49 +00:00
🐛 修复爬虫图片类型错误的问题
This commit is contained in:
parent
595762b060
commit
e0cd40d41a
@ -170,8 +170,8 @@ class Character(WikiModel):
|
||||
@property
|
||||
def icon(self) -> CharacterIcon:
|
||||
return CharacterIcon(
|
||||
icon=str(SCRAPE_HOST.join(f'/img/{self.id}_icon.png')),
|
||||
side=str(SCRAPE_HOST.join(f'/img/{self.id}_side_icon.png')),
|
||||
gacha=str(SCRAPE_HOST.join(f'/img/{self.id}_gacha_card.png')),
|
||||
splash=str(SCRAPE_HOST.join(f'/img/{self.id}_gacha_splash.png'))
|
||||
icon=str(SCRAPE_HOST.join(f'/img/{self.id}_icon.webp')),
|
||||
side=str(SCRAPE_HOST.join(f'/img/{self.id}_side_icon.webp')),
|
||||
gacha=str(SCRAPE_HOST.join(f'/img/{self.id}_gacha_card.webp')),
|
||||
splash=str(SCRAPE_HOST.join(f'/img/{self.id}_gacha_splash.webp'))
|
||||
)
|
||||
|
@ -54,4 +54,4 @@ class Material(WikiModel):
|
||||
|
||||
@property
|
||||
def icon(self) -> str:
|
||||
return str(SCRAPE_HOST.join(f'/img/{self.id}.png'))
|
||||
return str(SCRAPE_HOST.join(f'/img/{self.id}.webp'))
|
||||
|
@ -137,7 +137,7 @@ class Weapon(WikiModel):
|
||||
@property
|
||||
def icon(self) -> WeaponIcon:
|
||||
return WeaponIcon(
|
||||
icon=str(SCRAPE_HOST.join(f'/img/{self.id}.png')),
|
||||
awakened=str(SCRAPE_HOST.join(f'/img/{self.id}_awaken_icon.png')),
|
||||
gacha=str(SCRAPE_HOST.join(f'/img/{self.id}_gacha_icon.png')),
|
||||
icon=str(SCRAPE_HOST.join(f'/img/{self.id}.webp')),
|
||||
awakened=str(SCRAPE_HOST.join(f'/img/{self.id}_awaken_icon.webp')),
|
||||
gacha=str(SCRAPE_HOST.join(f'/img/{self.id}_gacha_icon.webp')),
|
||||
)
|
||||
|
@ -85,7 +85,7 @@ class WeaponPlugin(BasePlugins):
|
||||
"weapon_info_max_level": _weapon_data.stats[-1].level,
|
||||
"progression_base_atk": round(_weapon_data.stats[-1].ATK),
|
||||
"weapon_info_source_list": [
|
||||
await url_to_file(str(SCRAPE_HOST.join(f'/img/{mid}.png')))
|
||||
await url_to_file(str(SCRAPE_HOST.join(f'/img/{mid}.webp')))
|
||||
for mid in _weapon_data.ascension[-3:]
|
||||
],
|
||||
"special_ability_name": _weapon_data.affix.name,
|
||||
@ -101,7 +101,7 @@ class WeaponPlugin(BasePlugins):
|
||||
"weapon_info_max_level": _weapon_data.stats[-1].level,
|
||||
"progression_base_atk": round(_weapon_data.stats[-1].ATK),
|
||||
"weapon_info_source_list": [
|
||||
await url_to_file(str(SCRAPE_HOST.join(f'/img/{mid}.png')))
|
||||
await url_to_file(str(SCRAPE_HOST.join(f'/img/{mid}.webp')))
|
||||
for mid in _weapon_data.ascension[-3:]
|
||||
],
|
||||
"special_ability_name": '',
|
||||
|
Loading…
Reference in New Issue
Block a user