feat: 添加对响应为 None 的处理以增强 main.py 的健壮性
This commit is contained in:
parent
2d75510c59
commit
9b74bdf312
3
main.py
3
main.py
@ -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 数组
|
||||||
|
Loading…
x
Reference in New Issue
Block a user