Questions tagged [pywhois]

A Python module written by Richard Penman to perform whois lookup.

29 questions
1
vote
0 answers

pywhois on domains with multiple records

I'm trying to create a simple app that will allow me to run a whois, but I've hit a road block. >>> w = pywhois.whois('google.com') >>> print w creation_date: [] domain_name: [] emails: [] ... I'm about 99% sure that I'm not getting any results…
1
vote
1 answer

a stable way to check domain availability with pywhois

I use this code to check domain availability: try: w = pywhois.whois('honarasai.com') if not w: message='Domain is available' except: message='Domain is taken' It returns this result: creation_date: ['11-jun-2012'] domain_name:…
Asma Gheisari
  • 5,794
  • 9
  • 30
  • 51
0
votes
1 answer

What is the simplest way to execute WHOIS protocol with python?

Im looking for a library or a code module that is most reccomended for WHOIS protocol. Note that i've been allready googling it , but i didnt found what i was looking for. what i need is something like this : WHOIS(ip) and the output will be the…
RanZilber
  • 1,840
  • 4
  • 31
  • 42
0
votes
1 answer

Why does pywhois return empty headers?

I am using pywhois module in Python to fetch the Whois headers for websites. While it runs fine for most of the websites, I am trying to understand why sites like google.com and few others come back with black headers. Does PyWhois work only with…
London guy
  • 27,522
  • 44
  • 121
  • 179
0
votes
1 answer

Why am I getting 'TypeError: a bytes-like object is required, not 'str'' when running my WHOIS script in the Linux terminal?

I am creating a basic "whois" script, but it is not working. When I try to run it in the Linux terminal, it returns the error: "TypeError: a bytes-like object is required, not 'str'" indicated in the line of code:…
Gustang
  • 21
  • 2
0
votes
0 answers

Python WHOIS Bulk Look up for Domain Creation Date

Seeking for help as I would like to do a bulk whois lookup by reading a csv with domain names, and obtain the creation date of these domains and write it into a new csv. import whois infile = "domains.txt" get domains from file with open(infile,…
Sean
  • 1
  • 1
0
votes
2 answers

AttributeError: 'NoneType' object has no attribute 'strftime'AttributeError: 'NoneType' object has no attribute 'strftime'

I get an error for "AttributeError: 'NoneType' object has no attribute 'strftime'AttributeError: 'NoneType' object has no attribute 'strftime'". see full trace below: ipython-input-96-a5697ab98b57> in ----> 1…
Swooz
  • 5
  • 3
0
votes
2 answers

how to use pywhois module in gae

I have problems when try to import pywhois module, i can import my own module but still have troubles when import pywhois. I moved the pywhois folder in my project folder domain, the screentshot is below: This is the import and calling statment…
huangli
  • 454
  • 9
  • 26
0
votes
1 answer

Error ModuleNotFoundError: No module named 'whois.whois'

I get this error saying ModuleNotFoundError: No module named 'whois.whois' from https://pypi.org/project/python-whois/ https://pypi.org/project/whois/ I have installed all whois packages import whois domain =…
Jacky
  • 41
  • 1
  • 9
0
votes
1 answer

Can't import whois in .py file, but can in shell

I have recently installed whois. When I try to import the whois module in a .py file I get a ModuleNotFoundError. However, when I give the import command in a Python shell the problem does not occur, and the module imports as expected. Each time I…
Frank Fanelli
  • 321
  • 1
  • 3
  • 19
0
votes
1 answer

Bulk Whois lookup Of 20,000 domains - getting timeouts

Am trying to BULK extract WHOIS information for 20,000 domain names, the python code works with 2 items in my csv file but brings error with the whole dataset of 20000 domain names tried with 2 domain names, OK. using a full list of 20k domain names…
Sam
  • 5
  • 3
0
votes
1 answer

pywhois parsed results into mysql

sorry if you consider as repost, quite simple code and i suspect also a trivial error here, but can't move forward: import whois import MySQLdb db = MySQLdb.connect(host="localhost", user="root", passwd="pass", db="whois") cur = db.cursor() wi =…
gejza
  • 3
  • 2
-2
votes
2 answers

Get results from a for loop in Python

I am new to coding in Python and ran into an issue. I have a list of domain names that I would like to get whois lookup information of. I am using a for look to get whois information on every domain in the list called domain_name like this: for i in…
grandi
  • 1
  • 2
-2
votes
2 answers

How to query the RIPE API for JSON

How do you get the RIPE REST API to give you in JSON the same data you'd get from the whois command on the command line? Eg. Something like the output of whois 1.1.1.1
Jonathan
  • 10,792
  • 5
  • 65
  • 85
1
2