You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Joe,
I think I found the cause of an issue in your module (it may be related with #76 ):
I am using python 2.7 with pythonwhois v2.4.3 and I was having problems with some .org (cofteruel.org, apache.org, bancodesangreanimal.org...) TLD (that's what I found so far):
from pythonwhois import get_whois
whois_data = get_whois("apache.org")
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/pythonwhois/init.py", line 4, in get_whois
raw_data, server_list = net.get_whois_raw(domain, with_server_list=True)
File "/usr/local/lib/python2.7/dist-packages/pythonwhois/net.py", line 70, in get_whois_raw
return get_whois_raw(domain, referal_server, new_list, server_list=server_list, with_server_list=with_server_list)
File "/usr/local/lib/python2.7/dist-packages/pythonwhois/net.py", line 45, in get_whois_raw
response = whois_request(request_domain, target_server)
File "/usr/local/lib/python2.7/dist-packages/pythonwhois/net.py", line 89, in whois_request
sock.connect((server, port))
File "/usr/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 111] Connection refused
So, I tried to look for the problem, I debugged it and use another library that actually works to compare them:
With the other library I get:
I checked the output of the other library and figured out that problem is in the referral_url. In this case 'referral_url': 'www.domain.com'.
Some people fill referral_url with domains that are not a whois server itself and it is altering the behaviour of your module.
Also: not always is filled out with www.domain.com. E.g bancodesangreanimal.org has filled out with 'referral_url': 'www.namesilo.com'.
I commented that lines (68 and 70) at net.py and it works, but I know that it is not a solution because referral_url should give (as I understood, correct me if I am wrong) more information than the previous (whois.pir.org here)
Besides, I would like to ask you to add a settimeout before the call to the whois server, to get a socket exception if there is no answer from the server instead of waiting for the default timeout. As I needed it I added 10 seconds.
Hope this is helpful to you.
Best regards.
The text was updated successfully, but these errors were encountered:
Hi Joe,
I think I found the cause of an issue in your module (it may be related with #76 ):
I am using python 2.7 with pythonwhois v2.4.3 and I was having problems with some .org (cofteruel.org, apache.org, bancodesangreanimal.org...) TLD (that's what I found so far):
So, I tried to look for the problem, I debugged it and use another library that actually works to compare them:
With the other library I get:
So I thought that the problem was on the server call.
I printed the server with pprint and I got this:
I checked the output of the other library and figured out that problem is in the referral_url. In this case 'referral_url': 'www.domain.com'.
Some people fill referral_url with domains that are not a whois server itself and it is altering the behaviour of your module.
Also: not always is filled out with www.domain.com. E.g bancodesangreanimal.org has filled out with 'referral_url': 'www.namesilo.com'.
I commented that lines (68 and 70) at net.py and it works, but I know that it is not a solution because referral_url should give (as I understood, correct me if I am wrong) more information than the previous (whois.pir.org here)
Besides, I would like to ask you to add a settimeout before the call to the whois server, to get a socket exception if there is no answer from the server instead of waiting for the default timeout. As I needed it I added 10 seconds.
Hope this is helpful to you.
Best regards.
The text was updated successfully, but these errors were encountered: