Comments (10)
I am getting the same problem - I am iterating over a list of a couple hundred domains to clean up name servers. The whois lookup results are working properly, but this error keeps popping up in my output.
I am trying to use a progress bar in my command-line application but if anything is printed during the progressbar it makes the bar continue progressing on the next line.. and the error pops up so much that my whole command window is nearly filled with the progressbar. Need to be able to suppress the output of this error if possible.
I was able to fix this issue by forcing the 'quick' flag like so: (also runs a LOT faster!!)
Note that according to the code, this skips checking for a regional whois server for local results. I'm only interested in checking if a domain has expired/isn't registered so I don't believe this will cause any issues with that sort of check.
flags = 0
flags = flags | whois.NICClient.WHOIS_QUICK
w=whois.whois(domain, flags=flags)
from whois.
I've been having this issue, but the whois request works for me. The main issue is using a print()
to log the error to standard output. I don't want to see "Error trying to connect to socket: closing socket". Maybe logging it to a file or throwing an exception for the user to handle would be better?
from whois.
TCP communication looks different when using -h flag compared how to the imported function behaves when doing whois.whois(domain)
It seems it tries to connect to the registrar and in this case it's whois.marcaria.com that resolves to 45.60.33.228
When trying to run python3 whois.py -h 45.60.33.228.43 google.io I got something familiar back
Error trying to connect to socket: closing socket
I assume this component are trying to use registrar whois server as well? And in my case it's currently broken
from whois.
I received further information from Marcaria, they state they only offer whois via https and not port 43
Is there any way to fix this issue?
from whois.
I'm seeing what I think is the same error with any domains that use whois.name.com
On 0.7.2 it wouldn't work at all and output nothing, after upgrading to 0.7.3 I get the correct output along with Error trying to connect to socket: closing socket
from whois.
I am getting the same problem - I am iterating over a list of a couple hundred domains to clean up name servers. The whois lookup results are working properly, but this error keeps popping up in my output.
I am trying to use a progress bar in my command-line application but if anything is printed during the progressbar it makes the bar continue progressing on the next line.. and the error pops up so much that my whole command window is nearly filled with the progressbar. Need to be able to suppress the output of this error if possible.
from whois.
Getting the same issue while querying .com domains. Not sure why this is happening but is there any reason to keep the direct print statement?
It's quite inconvenient, especially with async code where you have no clue which coroutine printed the message.
from whois.
+1 to this, the messages were really unnerving at first; I was really worried my requests were failing.
from whois.
I just submitted a PR to address this.
from whois.
The PR of kylejohnson is nice, but it does not fix the actual issue ("Error trying to connect to socket: closing socket
being displayed to stdout")
I made a new PR ( #133 ) to complete kylejohnson's work
from whois.
Related Issues (20)
- Unhandled time format HOT 2
- No module named imp HOT 3
- It's time to release a new version in pypi! HOT 3
- .pro domain lookups don't work HOT 6
- proposal name swap HOT 5
- add domain status HOT 4
- No module named imp HOT 4
- Missing python-dateutil dependency in package installs HOT 2
- Problem with .ru zone HOT 4
- Problem with .ai domain HOT 2
- New release on Pypi HOT 2
- Default parser does not have Registrar URL HOT 1
- An error occurred: 'module' object is not callable
- Expiration date for .com.ua zone is a string instead of datetime HOT 1
- the sg domain not Expiry Date HOT 1
- Issue with .ai HOT 2
- Handling invalid creation_date format for some domains HOT 1
- .live domain is not resolving
- Library returns multiple timestamps per field, have no idea what it means HOT 1
- Rate limit HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whois.