quake api未返回对应字段导致报错
Zimba5880 opened this issue · 2 comments
Zimba5880 commented
测试发现似乎是quake api有时候返回的data里可能出现不存在service.http.title
这个字段导致的
文件路径:
Plugins\infoGather\WebspaceSearchEngine\quakeApi.py
相关代码:
if 'http' in service.keys():
http = service['http']
host = http['host']
title = http['title'] # 此处为报错的第62行,由于返回数据里可能没有title这个字段导致报错
经测试使用dict get方法后即可正常运行,建议改成以下形式:
if 'http' in service.keys():
http = service['http']
host = http['host']
title = http.get('title','not exist')
SkewwG commented
感谢师傅反馈,已修复
2328956238 commented
感谢,师傅