[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

odd number of arguments in Nokogiri

Vikas Maskeri

5/5/2009 6:46:00 AM

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.
--
Posted via http://www.ruby-....

4 Answers

Srijayanth Sridhar

5/5/2009 7:53:00 AM

0

[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

On Tue, May 5, 2009 at 12:15 PM, Vikas Maskeri
<vikas.maskeri@paladion.net>wrote:

> 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.
> --
> Posted via http://www.ruby-....
>
>

jat

6/5/2011 9:30:00 PM

0

On 06/05/2011 05:31 PM, ljsprojects wrote:
> On Jun 5, 12:44 pm, jat<j...@none.null> wrote:
>> On 06/05/2011 11:45 AM, VivaChavez wrote:>http://www.cloviscartoons.com/2011/02/01/uprising-in-egypt-......
>>
>> Very funny :-)
>>
>> --
>> /jat
>> Knowledge shall make you free
>> El conocimiento te har libre
>
> Algunos brutos son tan brutos que no se dan cuenta que son brutos.
>
> T.Schmidt
Here is another one
http://www.cloviscartoons.com/wp-content/uploads/2011/01/20...

--
/jat
Knowledge shall make you free
El conocimiento te har? libre

FALCON

6/6/2011 4:24:00 AM

0



Y definitivamente hay que ser requete bruto para seguir defendiendo al
farsante de Chavez...(aparte de traidor, corrupto e inepto)

tschmidtundert

6/6/2011 1:40:00 PM

0

On Jun 5, 10:23 pm, VivaChavez <TruthSetsUFr...@yahoo.com> wrote:
> Y definitivamente hay que ser requete bruto para seguir defendiendo al
> farsante de Chavez...(aparte de traidor, corrupto e inepto)

Necesitas visitar al psiquiatra. Los años te estan haciendo estragos.

T.Schmidt
P.S. Yo comprendi a Chavez desde un principio. Me parece que te
enagañaste solita.