saghul / aiodns

Simple DNS resolver for asyncio

Home Page:https://pypi.python.org/pypi/aiodns

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when running aiodns

DemGiran opened this issue · comments

commented

future: <Future finished exception=DNSError(1, 'DNS server returned answer with no data')>
aiodns.error.DNSError: (1, 'DNS server returned answer with no data')
Future exception was never retrieved

Code is as follows:

import asyncio
import aiodns
from tqdm import tqdm
import time

from src.utils.load import load

loop = asyncio.get_event_loop()
resolver = aiodns.DNSResolver(loop=loop, nameservers=['8.8.8.8'])

bucket = [....]
f = []
for i in tqdm(bucket):
    f = resolver.query(i+'.com','NS')



result = loop.run_until_complete(f)
print(result)

What domain is this failing for? The code looks ok.