1
Fork 0
mirror of https://github.com/RGBCube/VReplBot synced 2025-07-25 15:37:46 +00:00
This commit is contained in:
RGBCube 2023-02-05 12:37:40 +03:00
parent 01fd424c09
commit 6d136df3dd

View file

@ -1,6 +1,5 @@
from __future__ import annotations
import ast
import json
from io import BytesIO
from typing import Literal, TYPE_CHECKING
@ -60,7 +59,7 @@ class Playground(
f"https://play.vlang.io/run_test",
data = { "code": code },
) as response:
body = ast.literal_eval(await response.text())
body = json.loads(await response.json(encoding = "utf-8"))
return body["ok"], body["output"]