quake api未返回对应字段导致报错
Zimba5880 opened this issue · comments
测试发现似乎是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')
感谢师傅反馈,已修复
感谢,师傅