In the last meeting of Purdue Perl Mongers, Joe Kline mentioned Sawyer X's YAPC::NA talk on Modern Web Scraping, where he talked about Web::Query, which uses CSS selectors, compared to the XPath selectors he uses for his own web scraping.
I had just written and posted code where I used Mojo::DOM to scrape YouTube. So decided to do a head-to-head parsing of the same corpus.
And found that, except for
Seriously, only a small string that says it's using Web::Query or Mojo::DOM that's different.
In running, Mojo::DOM is a little bit faster, though.
I had just written and posted code where I used Mojo::DOM to scrape YouTube. So decided to do a head-to-head parsing of the same corpus.
And found that, except for
wq($file)
and Mojo::DOM->new($file)
, the code is identical.Seriously, only a small string that says it's using Web::Query or Mojo::DOM that's different.
In running, Mojo::DOM is a little bit faster, though.
No comments:
Post a Comment