Handle only A and AAAA records in Google API answers

This commit is contained in:
ValdikSS 2017-05-18 20:26:32 +03:00
parent ef81aa246a
commit 7cd662c96f

View File

@ -242,7 +242,8 @@ def _get_a_record_over_google_api(site, querytype='A'):
response_js = json.loads(response[1])
try:
for dnsanswer in response_js['Answer']:
result.append(dnsanswer['data'])
if dnsanswer['type'] in (1, 28):
result.append(dnsanswer['data'])
except KeyError:
pass
return result