Hpricot problems

D

Dean Kassmann

Has anyone successfully used Hpricot call multiple pages in the same
ruby script:

# begin code

require 'hpricot'
require 'open-uri'

url = "http://ibm.com"
N = 5

page = nil

for counter in (0..N)

puts counter.to_s() + "> checking " + url
page = Hpricot( open( url ) )
sleep(2)

end

# end code

I end up with the following error:
ruby test.rb
0> checking http://ibm.com
1> checking http://ibm.com
2> checking http://ibm.com
3> checking http://ibm.com
c:/ruby/lib/ruby/gems/1.8/gems/hpricot-0.5-mswin32/lib/hpricot/parse.rb:44:
[BUG] Segmentation fault
ruby 1.8.2 (2004-12-25) [i386-mswin32]


This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Any pointers?
 

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

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top