Iterate over a list in python -


I am using the module to get a list of several entries on a specific domain:

       Pre> 

A list of the above entries comes back Such as:

[u domain name: google.com \ n registry domain ID: \ n registrar WHOIS server: whois.markmonitor.com \ NRegistrar URL: \ nDateDate: 2014-05 -19T 04: 00: 17-0700 \ n Date of work: 1997-09-15T 00: 00-0700 \ n Registrar registration expires Date: 2020-09-13T21: 00: 00-0700 \ N

My question is how do I rehearse on the list and how to get results in an elegant human readable list Can i print

A simple way to print each string in the returned whois For:

  host = 'stackoverflow com' whois = pythonwhois.net.get_whois_raw (host) for items in whois: print it    

This will be something like this:

  domain name: STACKOVERFLOW.COM registrar WHOIS server: whois.name.com registrar URL: http: //www.name.com Updated Date: 2014-05 -09T17: 51: 17-06: 00 Manufacturing date: 2003-12-26 T19: 18: 07-07: 00 Registrar registration expiration date: 2015 -12-26 T19: 18 Registrar: I Stack Exchange, Inc. Registrant Street: 1 Exchange Plaza, Floor 26 Registrar City: Registrar of New York State / Province: NY Registrar Postal Code: 10006 Registrar Country: US etc. Instead, you will need to use the  pythonwhois.get_whois (host)  and navigate while returning the language formatting and showing areas of interest.   

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -