Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whois Parser for .de (Germany) fails with Unexpected Token #655

Closed
jensb opened this issue Dec 1, 2022 · 1 comment
Closed

Whois Parser for .de (Germany) fails with Unexpected Token #655

jensb opened this issue Dec 1, 2022 · 1 comment

Comments

@jensb
Copy link

jensb commented Dec 1, 2022

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
Copy link
Author

jensb commented Dec 1, 2022

Moved to whois-parser. Sorry :)

@jensb jensb closed this as completed Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant