Closed AumCoin closed 12 months ago
You can see the record object how it is composed: in its essence, it's an array of string parts
.
Once you have a whois record, you can extract the parts and store them where you want.
record = Whois.whois("google.it")
parts = record.parts # => Array<String>
Whois::Record.new(nil, parts)
Also note that your code is trying to compare a parser with a record, which are two completely different objects. The following line in your code returns a parser, not a record.
record = Whois.whois("google.it").parser
The doc at https://whoisrb.org/docs/v3/documentation/ says
Parser.changed?
can be passed a record, but on my system it only takes a parser:I assume records don't change that often that I would need to check it frequently, so presumably the idea was to save a record and check it later to see if it had changed unexpectedly, but I can't figure out how to get a
Whois::Record
object from a string.I need this because I was hoping to monitor the status of a large number of domains I own for unauthorized changes, but most of the ones I tried failed to parse out any contacts (which is weird because I can plainly see the info, in a format I've seen a thousand times, on https://www.whois.com/whois/nadhiya.com; seriously, how sophisticated does something need to be to parse the data when the data is meticulously labeled in a standard format), to where I decided the feature was useless for my needs.
I could just compare one text record to another but I was hoping this library could do something more intelligent, based on the claim that
changed?
attempts to guess if the current WHOIS response changed compared to an other WHOIS response passed as parameter". What am I missing here?