6 ms·
when i need to scrap a webpage, i use phpQuery (http://code.google.com/p/phpquery/ http://code.google.com/p/phpquery/), it's dead simple if you have experience
by mbustamante 14y ago
when i need to scrap a webpage, i use phpQuery (http://code.google.com/p/phpquery/ http://code.google.com/p/phpquery/), it's dead simple if you have experience with jQuery and i get all the benefits of a server-side programming language.
- zevyoura 14y agoA similar module for node.js: https://github.com/mape/node-scraper https://github.com/mape/node-scraper
- latchkey 14y agoBetter than that is http://node.io/ http://node.io/ Also, don't use jsdom (it is slow and strict), https://github.com/MatthewMueller/cheerio https://github.com/MatthewMueller/cheerio is much better.
- lazyjones 14y agoFor Perl you can use Web::Query (but don't use the default HTML::TreeBuilder::XPath with it, it's extremely slow - use http://search.cpan.org/dist/HTML-TreeBuilder-LibXML/ http://search.cpan.org/dist/HTML-TreeBuilder-LibXML/), or Mojo::DOM (part of Mojolicious: http://mojolicio.us/ http://mojolicio.us/). Both use the nowdays standard CSS selectors for comfortable handling. JavaScript can be scraped using WWW::Mechanize::Plugin::JavaScript or even WWW::Mechanize::Firefox).