Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Accessing registry data when a registrar parser exists
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Justin Campbell  
View profile   Translate to Translated (View Original)
 More options Aug 24 2012, 3:40 pm
From: Justin Campbell <jus...@justincampbell.me>
Date: Fri, 24 Aug 2012 12:40:04 -0700 (PDT)
Local: Fri, Aug 24 2012 3:40 pm
Subject: Accessing registry data when a registrar parser exists

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Simone Carletti  
View profile  
 More options Sep 5 2012, 7:06 pm
From: Simone Carletti <wep...@gmail.com>
Date: Wed, 5 Sep 2012 16:06:35 -0700 (PDT)
Local: Wed, Sep 5 2012 7:06 pm
Subject: Re: Accessing registry data when a registrar parser exists

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?

-- Simone


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Justin Campbell  
View profile  
 More options Sep 5 2012, 7:11 pm
From: Justin Campbell <jus...@justincampbell.me>
Date: Wed, 5 Sep 2012 19:11:24 -0400
Local: Wed, Sep 5 2012 7:11 pm
Subject: Re: Accessing registry data when a registrar parser exists

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?

-- Simone


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Simone Carletti  
View profile  
 More options Sep 5 2012, 7:14 pm
From: Simone Carletti <wep...@weppos.net>
Date: Thu, 6 Sep 2012 01:14:14 +0200
Local: Wed, Sep 5 2012 7:14 pm
Subject: Re: Accessing registry data when a registrar parser exists

Still hard to understand.

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:

--
Simone Carletti
Application Developer

Site & Blog: http://www.simonecarletti.com/
LinkedIn: http://linkedin.com/in/weppos
Skype: weppos


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Simone Carletti  
View profile  
 More options Sep 5 2012, 8:24 pm
From: Simone Carletti <wep...@weppos.net>
Date: Thu, 6 Sep 2012 02:23:24 +0200
Local: Wed, Sep 5 2012 8:23 pm
Subject: Re: Accessing registry data when a registrar parser exists

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.

```
1.9.2p320 :014 > p1.created_on
 => 1997-01-02 00:00:00 +0100
1.9.2p320 :015 > p2.created_on
 => 1997-01-02 00:00:00 +0100
```

In this case the results are the same, but they come from two different
parsers.

```
1.9.2p320 :017 > p1.class
 => Whois::Record::Parser::WhoisMarkmonitorCom
1.9.2p320 :018 > p2.class
 => Whois::Record::Parser::WhoisCrsnicNet
```

-- Simone


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Justin Campbell  
View profile  
 More options Sep 5 2012, 8:40 pm
From: Justin Campbell <jus...@justincampbell.me>
Date: Wed, 5 Sep 2012 20:40:12 -0400
Local: Wed, Sep 5 2012 8:40 pm
Subject: Re: Accessing registry data when a registrar parser exists

This is exactly what I was looking for, thank you!

-Justin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »