changed html extraction to use nokogiri. gives intermittent segfaults under OSX