From 7e6f3296bba9ceb837eab2d8245df848b11d6b64 Mon Sep 17 00:00:00 2001 From: Benjamin Funke Date: Fri, 28 Feb 2025 15:36:11 +0100 Subject: [PATCH 1/3] improve README --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 819f7b2..3e624d5 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # PythonDNSPerformancetest # Just the code for the Youtube-Let's Code. -Make sure you have done +Make sure you have done: `pip install dnspython` - Youtube: + YouTube: https://youtu.be/MP8lMbgv1Ls -and feel free to add more Nameservers and domains for a better test +And feel free to add more Nameservers and domains for a better test. From a7722fb20218f9c59bbe13bd823f407e68d67886 Mon Sep 17 00:00:00 2001 From: Benjamin Funke Date: Fri, 28 Feb 2025 15:41:00 +0100 Subject: [PATCH 2/3] add cloudflare domain to domains table --- dnsperformancetest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dnsperformancetest.py b/dnsperformancetest.py index 218b05f..c377a20 100644 --- a/dnsperformancetest.py +++ b/dnsperformancetest.py @@ -3,7 +3,7 @@ dnsserver = ['1.1.1.1','4.2.2.1','8.8.8.8','9.9.9.9','80.80.80.80','208.67.222.123','199.85.126.20','185.228.168.168','77.88.8.7','176.103.130.132','156.154.70.3','8.26.56.26'] -domains = ['google.com', 'amazon.com', 'facebook.com', 'the-morpheus.de'] +domains = ['google.com', 'amazon.com', 'facebook.com', 'the-morpheus.de', 'cloudflare.com'] toplist = [] From 2cc075d17e3e394b06f3b8fea28ba25b0af0292a Mon Sep 17 00:00:00 2001 From: Benjamin Funke Date: Fri, 28 Feb 2025 15:43:50 +0100 Subject: [PATCH 3/3] Fix deprecation warning in dns.resolver() --- dnsperformancetest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dnsperformancetest.py b/dnsperformancetest.py index c377a20..de16904 100644 --- a/dnsperformancetest.py +++ b/dnsperformancetest.py @@ -11,7 +11,7 @@ avg = 0 for j in domains: try: - resolv = dns.resolver.Resolver() + resolv = dns.resolver.Resolver.resolve() resolv.nameservers = [i] resolv.timeout = 1 start = time.time()