Spaces:
Runtime error
Runtime error
Download tests/test_google_dns.py from Darshankumarr03/Swift-Query: direct link, hf CLI and curl.
- Browser
- Download file 274 Bytes
-
https://huggingface.co/spaces/Darshankumarr03/Swift-Query/resolve/main/tests/test_google_dns.py
- Command line
-
hf download hf://spaces/Darshankumarr03/Swift-Query/tests/test_google_dns.py
-
curl -L -o test_google_dns.py https://huggingface.co/spaces/Darshankumarr03/Swift-Query/resolve/main/tests/test_google_dns.py
274 Bytes
| import dns.resolver | |
| res = dns.resolver.Resolver(configure=False) | |
| res.nameservers = ['8.8.8.8'] | |
| try: | |
| answers = res.resolve('_mongodb._tcp.swiftquery.itavzao.mongodb.net', 'SRV') | |
| print("Google DNS Works!") | |
| except Exception as e: | |
| print(f"Google DNS Failed: {e}") | |