fix(maizone): 修复处理动态时因feed为空引发的错误
在处理QQ空间动态列表时,单个`feed`对象可能为`None`,导致在访问其属性(如`appid`)时引发`TypeError`。 本次提交通过增加一个空值检查,在遍历动态列表时跳过为`None`的`feed`项,从而避免了潜在的程序崩溃,增强了代码的健壮性。
This commit is contained in:
committed by
Windpicker-owo
parent
8955e80d8d
commit
a9db24d80f
@@ -460,6 +460,8 @@ class QZoneService:
|
|||||||
|
|
||||||
feeds_list = []
|
feeds_list = []
|
||||||
for feed in feeds_data:
|
for feed in feeds_data:
|
||||||
|
if feed is None:
|
||||||
|
continue
|
||||||
if str(feed.get("appid", "")) != "311" or str(feed.get("uin", "")) == str(uin):
|
if str(feed.get("appid", "")) != "311" or str(feed.get("uin", "")) == str(uin):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user