I want to know if it's possible to access the registry data, such as #created_on, even if there is a registrar parser, and that parser also supports #created_on. Is this possible right now, and if not would it be something that would be welcome in a pull request? Thanks in advance if you could point me in the right direction.
Hi Justin, sorry for the late reply, I was far from emails.
On Friday, August 24, 2012 9:40:04 PM UTC+2, Justin Campbell wrote:
> I want to know if it's possible to access the registry data, such as > #created_on, even if there is a registrar parser, and that parser also > supports #created_on. Is this possible right now, and if not would it be > something that would be welcome in a pull request? Thanks in advance if you > could point me in the right direction.
> -Justin
I'm not sure I understood the question. You can always access the original response by converting the Record object to a String, no matter whether a Parser exists. Is this what you are asking for?
Well, moreso to accessed the parsed data. So for instance, retrieving the
#updated_at from the registry instead of the registrar.
Thanks!
-Justin
Sent from my iPhone
On Sep 5, 2012, at 7:06 PM, Simone Carletti <wep...@gmail.com> wrote:
Hi Justin,
sorry for the late reply, I was far from emails.
On Friday, August 24, 2012 9:40:04 PM UTC+2, Justin Campbell wrote:
> I want to know if it's possible to access the registry data, such as
> #created_on, even if there is a registrar parser, and that parser also
> supports #created_on. Is this possible right now, and if not would it be
> something that would be welcome in a pull request? Thanks in advance if you
> could point me in the right direction.
> -Justin
I'm not sure I understood the question. You can always access the original
response by converting the Record object to a String, no matter whether a
Parser exists. Is this what you are asking for?
From a WHOIS point of view, the registry and the registrar are the same
entity. Unless you are talking about thin WHOIS servers such as the .COM or
.NET, where Verisign acts as a proxy for the final registrar.
Is this what you are referring to? Could you provide a real example of what
you need to that I have a better understanding of the issue?
-- Simone
On Thu, Sep 6, 2012 at 1:11 AM, Justin Campbell <jus...@justincampbell.me>wrote:
> Well, moreso to accessed the parsed data. So for instance, retrieving the
> #updated_at from the registry instead of the registrar.
> Thanks!
> -Justin
> Sent from my iPhone
> On Sep 5, 2012, at 7:06 PM, Simone Carletti <wep...@gmail.com> wrote:
> Hi Justin,
> sorry for the late reply, I was far from emails.
> On Friday, August 24, 2012 9:40:04 PM UTC+2, Justin Campbell wrote:
>> I want to know if it's possible to access the registry data, such as
>> #created_on, even if there is a registrar parser, and that parser also
>> supports #created_on. Is this possible right now, and if not would it be
>> something that would be welcome in a pull request? Thanks in advance if you
>> could point me in the right direction.
>> -Justin
> I'm not sure I understood the question. You can always access the original
> response by converting the Record object to a String, no matter whether a
> Parser exists. Is this what you are asking for?
If I correctly understood your issue, you are essentially talking about the
case of a thin WHOIS request such as .COM or .NET requests. Basically, you
want to be able to get certain properties from the first WHOIS response, no
matter whether a second WHOIS part exists, then user the part 2 for certain
properties.
This is pretty simple.
```
r = Whois.query "hotel.com"
```
In this case you have two parts.
```
r.parts.count
```
The first one from Verisign, the second one from whois.markmonitor.com. If
you try to access the created_on property, the latter parser has higher
precedence. In other words, as you experienced, the result of
```
r.created_on
```
is the result of the parsing of the whois.markmonitor.com response. But, in
this case also the first response contains the created_at property. The
library automatically tries to determine which one is more relevant and
returns it. If you explicitely want to access one property, you need to
invoke the parser directly.
```
parsers = r.parser.parsers
# the markmonitor parser
p1 = parsers[0]
# the verisign parser
p2 = parsers[1]
```
Keep in mind that the order of the parsers is reversed compared to the
order of the responses.
Now you can access their properties separately.
On Wednesday, September 5, 2012 at 8:23 PM, Simone Carletti wrote:
> If I correctly understood your issue, you are essentially talking about the case of a thin WHOIS request such as .COM or .NET requests. Basically, you want to be able to get certain properties from the first WHOIS response, no matter whether a second WHOIS part exists, then user the part 2 for certain properties.
> The first one from Verisign, the second one from whois.markmonitor.com (http://whois.markmonitor.com). If you try to access the created_on property, the latter parser has higher precedence. In other words, as you experienced, the result of
> ```
> r.created_on
> ```
> is the result of the parsing of the whois.markmonitor.com (http://whois.markmonitor.com) response. But, in this case also the first response contains the created_at property. The library automatically tries to determine which one is more relevant and returns it. If you explicitely want to access one property, you need to invoke the parser directly.
> ```
> parsers = r.parser.parsers
> # the markmonitor parser
> p1 = parsers[0]
> # the verisign parser
> p2 = parsers[1]
> ```
> Keep in mind that the order of the parsers is reversed compared to the order of the responses.
> Now you can access their properties separately.