diff options
author | Kyomotoi <[email protected]> | 2022-06-12 15:24:35 +0800 |
---|---|---|
committer | Kyomotoi <[email protected]> | 2022-06-12 15:24:35 +0800 |
commit | 1b3c6ada3b7d5a002afa089aa16422a9e3d0fa0d (patch) | |
tree | fcfeda8363f75b56440a5d97989499856fcba420 | |
parent | 1b9e597225ef3da5a298d21ce16f0f7428f6dd57 (diff) | |
download | ATRI-1b3c6ada3b7d5a002afa089aa16422a9e3d0fa0d.tar.gz ATRI-1b3c6ada3b7d5a002afa089aa16422a9e3d0fa0d.tar.bz2 ATRI-1b3c6ada3b7d5a002afa089aa16422a9e3d0fa0d.zip |
🚑️ 解决 mainland 无法访问资源
-rw-r--r-- | ATRI/plugins/funny/data_source.py | 4 | ||||
-rw-r--r-- | ATRI/plugins/kimo/data_source.py | 2 | ||||
-rw-r--r-- | ATRI/plugins/polaroid/data_source.py | 2 | ||||
-rw-r--r-- | ATRI/plugins/setu/tf_dealer.py | 4 | ||||
-rw-r--r-- | ATRI/plugins/wife/data_source.py | 8 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | test/test_plugin_anime_search.py | 2 | ||||
-rw-r--r-- | test/test_plugin_saucenao.py | 2 |
8 files changed, 13 insertions, 13 deletions
diff --git a/ATRI/plugins/funny/data_source.py b/ATRI/plugins/funny/data_source.py index 7e9ba30..739f1b4 100644 --- a/ATRI/plugins/funny/data_source.py +++ b/ATRI/plugins/funny/data_source.py @@ -28,9 +28,7 @@ class Funny(Service): path = FUNNY_DIR / file_name if not path.is_file(): logger.warning("未发现笑话相关数据,正在下载并保存...") - url = ( - "https://cdn.jsdelivr.net/gh/Kyomotoi/CDN@master/project/ATRI/laugh.txt" - ) + url = "https://fastly.jsdelivr.net/gh/Kyomotoi/CDN@master/project/ATRI/laugh.txt" res = await request.get(url) context = res.text with open(path, "w", encoding="utf-8") as w: diff --git a/ATRI/plugins/kimo/data_source.py b/ATRI/plugins/kimo/data_source.py index 025f999..e93c68c 100644 --- a/ATRI/plugins/kimo/data_source.py +++ b/ATRI/plugins/kimo/data_source.py @@ -12,7 +12,7 @@ from ATRI.exceptions import ReadFileError, WriteFileError CHAT_PATH = Path(".") / "data" / "database" / "kimo" CHAT_PATH.mkdir(parents=True, exist_ok=True) -KIMO_URL = "https://cdn.jsdelivr.net/gh/Kyomotoi/AnimeThesaurus/data.json" +KIMO_URL = "https://fastly.jsdelivr.net/gh/Kyomotoi/AnimeThesaurus/data.json" class Kimo(Service): diff --git a/ATRI/plugins/polaroid/data_source.py b/ATRI/plugins/polaroid/data_source.py index 3575342..f1c44b0 100644 --- a/ATRI/plugins/polaroid/data_source.py +++ b/ATRI/plugins/polaroid/data_source.py @@ -8,7 +8,7 @@ from .image_dealer import image_dealer TENCENT_AVATER_URL = "https://q1.qlogo.cn/g?b=qq&nk={user_id}&s=640" -SOURCE_URL = "https://cdn.jsdelivr.net/gh/Kyomotoi/CDN@master/project/ATRI/" +SOURCE_URL = "https://fastly.jsdelivr.net/gh/Kyomotoi/CDN@master/project/ATRI/" class Polaroid(Service): diff --git a/ATRI/plugins/setu/tf_dealer.py b/ATRI/plugins/setu/tf_dealer.py index a6bd3f0..4e1eafa 100644 --- a/ATRI/plugins/setu/tf_dealer.py +++ b/ATRI/plugins/setu/tf_dealer.py @@ -21,7 +21,9 @@ SETU_PATH.mkdir(parents=True, exist_ok=True) TEMP_PATH.mkdir(parents=True, exist_ok=True) -MODULE_URL = "https://cdn.jsdelivr.net/gh/Kyomotoi/CDN@master/project/ATRI/nsfw.tflite" +MODULE_URL = ( + "https://fastly.jsdelivr.net/gh/Kyomotoi/CDN@master/project/ATRI/nsfw.tflite" +) VGG_MEAN = [104, 117, 123] diff --git a/ATRI/plugins/wife/data_source.py b/ATRI/plugins/wife/data_source.py index 7074f93..29d5b61 100644 --- a/ATRI/plugins/wife/data_source.py +++ b/ATRI/plugins/wife/data_source.py @@ -24,16 +24,16 @@ class Wife(Service): "mua!", "贴贴!", MessageSegment.image( - file="https://cdn.jsdelivr.net/gh/Kyomotoi/CDN@master/project/ATRI/wife0.jpg" + file="https://fastly.jsdelivr.net/gh/Kyomotoi/CDN@master/project/ATRI/wife0.jpg" ), MessageSegment.image( - file="https://cdn.jsdelivr.net/gh/Kyomotoi/CDN@master/project/ATRI/wife1.jpg" + file="https://fastly.jsdelivr.net/gh/Kyomotoi/CDN@master/project/ATRI/wife1.jpg" ), MessageSegment.image( - file="https://cdn.jsdelivr.net/gh/Kyomotoi/CDN@master/project/ATRI/wife2.jpg" + file="https://fastly.jsdelivr.net/gh/Kyomotoi/CDN@master/project/ATRI/wife2.jpg" ), MessageSegment.image( - file="https://cdn.jsdelivr.net/gh/Kyomotoi/CDN@master/project/ATRI/wife3.jpg" + file="https://fastly.jsdelivr.net/gh/Kyomotoi/CDN@master/project/ATRI/wife3.jpg" ), ] ) @@ -103,7 +103,7 @@ [Richard Chien](https://github.com/richardchien), [Mnixry](https://github.com/mnixry) and go-cqhttp Developers. [JetBrains](https://www.jetbrains.com/?from=ATRI): 为本项目提供 [PyCharm](https://www.jetbrains.com/pycharm/?from=ATRI) 等 IDE 的授权<br> -[<img src="https://cdn.jsdelivr.net/gh/Kyomotoi/CDN@master/noting/jetbrains-variant-3.png" width="150"/>](https://www.jetbrains.com/?from=ATRI) +[<img src="https://fastly.jsdelivr.net/gh/Kyomotoi/CDN@master/noting/jetbrains-variant-3.png" width="150"/>](https://www.jetbrains.com/?from=ATRI) <details markdown='1'><summary>以及以下朋友们!</summary> diff --git a/test/test_plugin_anime_search.py b/test/test_plugin_anime_search.py index 2782ba9..04c8847 100644 --- a/test/test_plugin_anime_search.py +++ b/test/test_plugin_anime_search.py @@ -23,7 +23,7 @@ async def test_saucenao(app: App): msg = Message( MessageSegment.image( - "https://cdn.jsdelivr.net/gh/Kyomotoi/CDN@master/noting/88674944_p0.png" + "https://fastly.jsdelivr.net/gh/Kyomotoi/CDN@master/noting/88674944_p0.png" ) ) event = make_fake_event(_message=msg)() diff --git a/test/test_plugin_saucenao.py b/test/test_plugin_saucenao.py index 2782ba9..04c8847 100644 --- a/test/test_plugin_saucenao.py +++ b/test/test_plugin_saucenao.py @@ -23,7 +23,7 @@ async def test_saucenao(app: App): msg = Message( MessageSegment.image( - "https://cdn.jsdelivr.net/gh/Kyomotoi/CDN@master/noting/88674944_p0.png" + "https://fastly.jsdelivr.net/gh/Kyomotoi/CDN@master/noting/88674944_p0.png" ) ) event = make_fake_event(_message=msg)() |