修复语法错误:Python try语句格式
This commit is contained in:
@@ -85,7 +85,7 @@ class SearchService:
|
||||
return results
|
||||
|
||||
# 3. 解析 JSON 提取搜索结果
|
||||
try {
|
||||
try:
|
||||
data = json.loads(stdout)
|
||||
except json.JSONDecodeError:
|
||||
print(f"解析 JSON 失败: {stdout[:500]}")
|
||||
|
||||
Reference in New Issue
Block a user