From ea2671c28497719a538c54583c2e8dd27fdcd59b Mon Sep 17 00:00:00 2001 From: wuyiwai Date: Tue, 4 Jun 2024 01:41:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=BE=91issu?= =?UTF-8?q?e=E5=86=85=E5=AE=B9=E5=90=8E=E8=A7=A6=E5=8F=91workflow=E6=97=B6?= =?UTF-8?q?=E6=8A=A5[KeyError:=20'ogImage']=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gmeek.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Gmeek.py b/Gmeek.py index 3a8dc43..3bbdb3e 100644 --- a/Gmeek.py +++ b/Gmeek.py @@ -460,7 +460,9 @@ for i in blog.blogBase["postListJson"]: del blog.blogBase["postListJson"][i]["script"] del blog.blogBase["postListJson"][i]["style"] del blog.blogBase["postListJson"][i]["top"] - del blog.blogBase["postListJson"][i]["ogImage"] + + if 'ogImage' in blog.blogBase["postListJson"][i]: + del blog.blogBase["postListJson"][i]["ogImage"] if 'commentNum' in blog.blogBase["postListJson"][i]: commentNumSum=commentNumSum+blog.blogBase["postListJson"][i]["commentNum"]