From: Ron M Date: 2007-05-11T09:33:07+09:00 Subject: hpricot choking on large attributes This script: ================= %W[rubygems open-uri hpricot].each{|x| require x} Hpricot.parse(open("http://www.opentable.com/rest_profile.aspx?rid=3292").read) ================= crashes hpricot for me with this error: ================= /usr/local/lib/ruby/gems/1.8/gems/hpricot-0.5/lib/hpricot/parse.rb:44:in `scan': ran out of buffer space on element , starting on line 23. (Hpricot::ParseError) from /usr/local/lib/ruby/gems/1.8/gems/hpricot-0.5/lib/hpricot/parse.rb:44:in `make' from /usr/local/lib/ruby/gems/1.8/gems/hpricot-0.5/lib/hpricot/parse.rb:15:in `parse' from (irb):3:in `irb_binding' from /usr/local/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding' from /usr/local/lib/ruby/1.8/irb/workspace.rb:52 ================= It's probably because there's some insanely large attribute on one of the HTML elements. ============ Could hpricot die more gracefully and still parse the document leaving only that element invalid when it sees such very large attributes?