Hi,
What is the best way to parse HTML?
Or is there a simple way to convert a table to an array?
I tried beautiful_soup and the built-in htmltools, but have trouble
getting them to run.
Any pointers?
Thanks, Hari
Hi,
What is the best way to parse HTML?
Or is there a simple way to convert a table to an array?
I tried beautiful_soup and the built-in htmltools, but have trouble
getting them to run.
Any pointers?
Thanks, Hari
My experience with Ruby’s html parsing tools are that they are
generally badly documented and buggy. I have had more success piping
the html I need parsed to a Perl program that uses Perl’s much, much
better html libraries and then reading back the output into my Ruby
program.
It’s ugly, but it works.
Check out search.cpan.org to see what perl classes are available.
-Scott
I used html-tools:
http://rubyforge.org/projects/ruby-htmltools/
and found it pretty simple to use but powerfull html parser library.
Igor A. wrote:
I used html-tools:
http://rubyforge.org/projects/ruby-htmltools/
and found it pretty simple to use but powerfull html parser library.
Thanks Scott for your reply. I am looking for a simple ruby solution as
the page I am trying to parse has only few tables in it.
Igor, I tried to get the html-tools to run but couldn’t succeed I
tried to run the ebaysearch.rb demo program and couldn’t run it either.
I am using Ruby 1.8 with RoR 1.1.
Where you able to use the html-tools? Can you share a simple/sample
code?
Thanks, Hari
BeautifulSoup has been ported to ruby as RubyfulSoup.
Rubyful Soup: "The brush has got entangled in it!"
it really works wonders when one must screen-scrape.
cheers,
jean-pierre
Igor A. wrote:
Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails
Hi Igor,
Have you quoted/attached something? I don’t see it.
Thanks, Hari
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs