From a53ca060879676200329dbd4a9e71b55e5ba29ca Mon Sep 17 00:00:00 2001 From: mediabot-pt <295750538+mediabot-pt@users.noreply.github.com> Date: Wed, 1 Jul 2026 12:19:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Groovy=E8=84=9A=E6=9C=ACJSON=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E5=8A=A0try-catch=E9=81=BF=E5=85=8DAPI=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E6=A0=BC=E5=BC=8F=E5=BC=82=E5=B8=B8=E6=97=B6=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/mteam.groovy | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/mteam.groovy b/docs/mteam.groovy index e601729..1ba9ddd 100644 --- a/docs/mteam.groovy +++ b/docs/mteam.groovy @@ -6,7 +6,12 @@ final String API_BASE = "https://api.m-team.io" Map parse(String content, String url) { def slurp = new groovy.json.JsonSlurper() - def root = slurp.parseText(content) + def root + try { + root = slurp.parseText(content) + } catch (e) { + return [pageName: '解析失败', message: "JSON 解析异常: ${e.message}"] + } if (url.contains('/api/member/profile')) return parseProfile(root?.data)