weppos / whois-parser

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

Cannot parse .de whois response #152

Open jensb opened 1 year ago

jensb commented 1 year ago

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
factor4 commented 1 year ago

I noticed the same...