From 013fd2a989b7a49ddff30ca2d9c476776ba4b109 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B0=B4=E5=B1=85=E5=AE=A4?= Date: Mon, 27 Mar 2023 09:04:08 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=9A=20Replace=20resource=20URL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- metadata/scripts/metadatas.py | 3 +-- metadata/scripts/paimon_moe.py | 2 +- modules/apihelper/client/components/remote.py | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/metadata/scripts/metadatas.py b/metadata/scripts/metadatas.py index 39f7723..fb9bdff 100644 --- a/metadata/scripts/metadatas.py +++ b/metadata/scripts/metadatas.py @@ -131,9 +131,8 @@ async def update_metadata_from_github(overwrite: bool = True): def make_github_fast(url: str) -> str: - url = url.replace("raw.githubusercontent.com", "raw.fastgit.org") url = url.replace("Dimbreath/GenshinData/master/", RESOURCE_DEFAULT_PATH) return url.replace( GENSHIN_PY_DATA_REPO, - f"https://raw.fastgit.org/{RESOURCE_DEFAULT_PATH}", + f"https://raw.githubusercontent.com/{RESOURCE_DEFAULT_PATH}", ) diff --git a/metadata/scripts/paimon_moe.py b/metadata/scripts/paimon_moe.py index db734c2..4e3395a 100644 --- a/metadata/scripts/paimon_moe.py +++ b/metadata/scripts/paimon_moe.py @@ -9,7 +9,7 @@ GACHA_LOG_PAIMON_MOE_PATH = PROJECT_ROOT.joinpath("metadata/data/paimon_moe_zh.j async def update_paimon_moe_zh(overwrite: bool = True): if not overwrite and GACHA_LOG_PAIMON_MOE_PATH.exists(): return - host = URL("https://raw.fastgit.org/MadeBaruna/paimon-moe/main/src/locales/items/zh.json") + host = URL("https://raw.githubusercontent.com/MadeBaruna/paimon-moe/main/src/locales/items/zh.json") client = AsyncClient() text = (await client.get(host)).text async with async_open(GACHA_LOG_PAIMON_MOE_PATH, mode="w", encoding="utf-8") as file: diff --git a/modules/apihelper/client/components/remote.py b/modules/apihelper/client/components/remote.py index b0f06f3..c6eff17 100644 --- a/modules/apihelper/client/components/remote.py +++ b/modules/apihelper/client/components/remote.py @@ -8,7 +8,7 @@ from metadata.scripts.metadatas import RESOURCE_DEFAULT_PATH class Remote: """拉取云控资源""" - BASE_URL = f"https://raw.fastgit.org/{RESOURCE_DEFAULT_PATH}" + BASE_URL = f"https://raw.githubusercontent.com/{RESOURCE_DEFAULT_PATH}" CALENDAR = f"{BASE_URL}calendar.json" BIRTHDAY = f"{BASE_URL}birthday.json"