From 4a206e881ce5f4ae39b8f1f81f1c275a5af9118b Mon Sep 17 00:00:00 2001 From: liuji Date: Sat, 10 Oct 2026 15:00:23 +0800 Subject: [PATCH] Handle gviz response prefix --- sync.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sync.py b/sync.py index 97d5f2a..3572ad4 100755 --- a/sync.py +++ b/sync.py @@ -44,6 +44,8 @@ def read_gviz(sheet: str) -> list[list[str]]: response = requests.get(url, timeout=30) response.raise_for_status() text = response.text.strip() + if text.startswith("/*O_o*/"): + text = text[len("/*O_o*/") :].strip() if text.endswith(";"): text = text[:-1].rstrip() if not text.startswith(GVIZ_PREFIX) or not text.endswith(")"):