Forum: Ruby odd number of arguments in Nokogiri

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
74e8e637e688c3b83705ede35e502965?d=identicon&s=25 Vikas Maskeri (vikasmaskeri)
on 2009-05-05 08:45
Hi, I am using Nokogiri for parsing HTML pages.
The gem parses the tags properly only if the tags are properly closed
and also if the attributes are syntacticaly proper. But there seems to
be an issue with parsing if the tags are not properly complete.
For example, in an iframe tag, if the 'height' attribute is present but
no value is written for it, then an error occurs saying that "odd number
of arguments for hash".
Please suggest a solution for this problem.
1e736afdcdfe0753d67a81d449aca590?d=identicon&s=25 Srijayanth Sridhar (Guest)
on 2009-05-05 09:55
(Received via mailing list)
Have you tried using Nokogiri.Hpricot(open(some_url)) ?

I've had the same problem on several sites wrt Nokogiri. I have had to
use
Hpricot for sites with irregular HTML/XML. Its a pity since Nokogiri IS
faster.

Jayanth

On Tue, May 5, 2009 at 12:15 PM, Vikas Maskeri
This topic is locked and can not be replied to.