fix: support using GitHub Raw content as plugin source (#3975)

* Update plugin.py

* Update plugin.py

* Update plugin.py

* Update plugin.py
This commit is contained in:
i0cLiceao
2025-12-14 18:23:29 +08:00
committed by GitHub
parent e7e97730af
commit 6b73b19e54
+5 -1
View File
@@ -124,7 +124,11 @@ class PluginRoute(Route):
session.get(url) as response,
):
if response.status == 200:
remote_data = await response.json()
try:
remote_data = await response.json()
except aiohttp.ContentTypeError:
remote_text = await response.text()
remote_data = json.loads(remote_text)
# 检查远程数据是否为空
if not remote_data or (