login about faq

I would like to get stats out of a certain website. I would like to convert an html table to a csv (comma separated values)?

How would I go about doing this in say PHP/PERL/RUBY or any language?

HINT:( you can actually google a solution for this but let's build up the knowledge base here at nullpointer.ph)

asked Oct 16 '09 at 10:46

AnGoL's gravatar image

AnGoL
1.3k318

Any other taker from the other languages?

(Oct 16 '09 at 14:57) AnGoL AnGoL's gravatar image

Ruby: You can use Hpricot or Nokigiri to parse the table and its elements from the site's HTML.

And if I remember right, this could actually be done in VB - or any other language which can access ActiveX controls - by including a Browser control, loading the webpage and parsing the Documents object. It's a lot more work than using high-level HTML parsers though.

link

answered Oct 16 '09 at 11:23

Erol's gravatar image

Erol
1.3k1416

edited Oct 16 '09 at 11:37

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×63
×11
×9
×1
×1

Asked: Oct 16 '09 at 10:46

Seen: 1,394 times

Last updated: Oct 16 '09 at 11:37