weppos / whois-parser

An intelligent — pure Ruby — WHOIS parser.
https://whoisrb.org
MIT License
99 stars 102 forks source link

whoisrb docs 404 and outdated. (and how to parse previously fetch whois data ?) #121

Closed hss14 closed 5 years ago

hss14 commented 5 years ago

The manual pages on whoisrb.org are 404. Even the code on the homepage of whoisrb.org is outdated and thus wrong, and the doc pages provide little information.

Well.... What really haunts me is that I cannot find anywhere(stackoverflow included) how I can use this library to parse whois data previously fetched by linux whois command ?

weppos commented 5 years ago

The pages work fine for me.

You can supply external data. You will need to create a Whois::Record and feed it to the Whois::Parser.

https://github.com/weppos/whois-parser/blob/master/lib/whois/parser.rb#L183-L189

A Whois::Record will be composed by as many Whois::Part as parts your response contain. I don't have an example ready, you will need to dig a bit into the definition of the Whois::Record and Whois::Part to instantiate them from the data you have.