aiodns是asyncio的简单DNS解决方案
示例:
import asyncioimport aiodnsloop = asyncio.get_event_loop()resolver = aiodns.DNSResolver(loop=loop)f = resolver.query('google.com','A')result = loop.run_until_complete(f)print(result)aiodns是asyncio的简单DNS解决方案
示例:
import asyncioimport aiodnsloop = asyncio.get_event_loop()resolver = aiodns.DNSResolver(loop=loop)f = resolver.query('google.com','A')result = loop.run_until_complete(f)print(result)
评论