odd number of arguments in Nokogiri

V

Vikas Maskeri

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.
 
S

Srijayanth Sridhar

[Note: parts of this message were removed to make it a legal post.]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top