feat: 添加对响应为 None 的处理以增强 main.py 的健壮性

This commit is contained in:
晓丰 2025-05-22 11:46:26 +08:00
parent 2d75510c59
commit 9b74bdf312

View File

@ -591,7 +591,8 @@ def get_searchInfo(keyword, level, headers, proxy_name, r=2):
headers=headers, headers=headers,
proxy_name=proxy_name proxy_name=proxy_name
) )
if response is None:
return None
jsondata = response.json() jsondata = response.json()
try: try:
errors = jsondata.get("errors") # GraphQL errors 数组 errors = jsondata.get("errors") # GraphQL errors 数组