whois-parser icon indicating copy to clipboard operation
whois-parser copied to clipboard

Cannot parse .de whois response

Open jensb opened this issue 3 years ago • 1 comments

With .de domains, the parser (v5.1.0 gem) cannot handle the whois output format:

w = Whois::Client.new
w.lookup("google.de").parser.available?
/var/lib/gems/3.0.0/gems/whois-parser-2.0.0/lib/whois/scanners/base.rb:108:in `error!': Unexpected token: % Restricted rights. (Whois::ParserError)
% 
% Terms and Conditions of Use
% ...

It seems that the parser cannot handle lines beginning with "%". (which are supposed to be free-text comments) How can I fix thix? I tried adding this to base.rb, but this did have no effect:

      tokenizer :skip_comment do
        @input.skip(/^\%/)
      end

jensb avatar Dec 01 '22 18:12 jensb

I noticed the same...

factor4 avatar Jan 09 '23 10:01 factor4