diff --git a/models/wiki/character.py b/models/wiki/character.py index e8979f15..d4633dcb 100644 --- a/models/wiki/character.py +++ b/models/wiki/character.py @@ -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')) ) diff --git a/models/wiki/material.py b/models/wiki/material.py index 2a21da8f..6cdb9307 100644 --- a/models/wiki/material.py +++ b/models/wiki/material.py @@ -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')) diff --git a/models/wiki/weapon.py b/models/wiki/weapon.py index e50a770f..4a488584 100644 --- a/models/wiki/weapon.py +++ b/models/wiki/weapon.py @@ -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')), ) diff --git a/plugins/genshin/weapon.py b/plugins/genshin/weapon.py index d14183b8..6c4c2fc3 100644 --- a/plugins/genshin/weapon.py +++ b/plugins/genshin/weapon.py @@ -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": '',