Evan Martin (evan) wrote in evan_tech,
Evan Martin
evan
evan_tech

screen scraping with ruby

For various reasons I seem to often need to screen-scrape websites. I've tried Rubyful Soup but it seems to take tens of seconds to parse relatively small files. I just now tried htmltools as well and it's also incredibly slow -- 9.7 seconds to parse a 400kb file on a P4 3.8ghz machine!

The file is really straightforward, too: it's just one huge table. How hard is this to parse quickly? Firefox seems to have no trouble with it...

So my question for you: what should I be using instead? (I'm happy to switch languages -- gaal/brad, which Perl HTML parsing library is the most pleasant? Preferably something that doesn't use SAX or DOM APIs...)
Tags: grumpy, ruby
Subscribe

  • memcache job offers

    I get occasional recruiter spam that specifically calls out "my work on memcached". This is pretty funny because all I did was make some trivial…

  • application stack

    "Put yourself in 1995. I'm going to tell the you of 1995 that in 2010, there will be a software platform with the following properties:" Luis Villa…

  • bsd license advertising

    Did you know that the 3-clause BSD (that is, the one with the "advertising" clause stripped) license still has an advertising requirement? Read it…

  • Post a new comment

    Error

    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 19 comments

  • memcache job offers

    I get occasional recruiter spam that specifically calls out "my work on memcached". This is pretty funny because all I did was make some trivial…

  • application stack

    "Put yourself in 1995. I'm going to tell the you of 1995 that in 2010, there will be a software platform with the following properties:" Luis Villa…

  • bsd license advertising

    Did you know that the 3-clause BSD (that is, the one with the "advertising" clause stripped) license still has an advertising requirement? Read it…