diff --git a/gram_core b/gram_core index 94a4aca6..30cc0cf8 160000 --- a/gram_core +++ b/gram_core @@ -1 +1 @@ -Subproject commit 94a4aca6ff3b02f897f96f7a7629a3c72eda4513 +Subproject commit 30cc0cf8f700f50ad3063b2f3bca4f325f121bd3 diff --git a/modules/apihelper/client/components/hyperion.py b/modules/apihelper/client/components/hyperion.py index 6aaed677..8cdf54fb 100644 --- a/modules/apihelper/client/components/hyperion.py +++ b/modules/apihelper/client/components/hyperion.py @@ -3,7 +3,6 @@ import os import re from typing import List -from core.config import config from ..base.hyperionrequest import HyperionRequest from ...models.genshin.hyperion import PostInfo, ArtworkImage from ...typedefs import JSON_DATA @@ -124,7 +123,6 @@ class Hyperion: filename = os.path.basename(url) _, file_extension = os.path.splitext(filename) is_image = bool(file_extension in ".jpg" or file_extension in ".png") - url = url.replace("https://upload-bbs.miyoushe.com", config.upload_bbs_host) response = await self.client.get( url, params=self.get_images_params(resize=2000) if is_image else None, de_json=False ) diff --git a/utils/__init__.py b/utils/__init__.py index e69de29b..4829b6fd 100644 --- a/utils/__init__.py +++ b/utils/__init__.py @@ -0,0 +1,3 @@ +import utils.patch + +__all__ = (utils.patch,) diff --git a/utils/patch/__init__.py b/utils/patch/__init__.py index e83dfdd4..8d3b7033 100644 --- a/utils/patch/__init__.py +++ b/utils/patch/__init__.py @@ -1,3 +1,5 @@ -from utils.patch import simnet +import pkgutil +from pathlib import Path -__all__ = ["simnet"] +for _, file, _ in pkgutil.iter_modules([str(Path(__file__).parent.absolute())]): + __import__(file, globals(), level=1)