开发者

Following a link using Nokogiri for scraping

开发者 https://www.devze.com 2022-12-30 01:03 出处:网络
Is there a method to follow a link using Nokogiri for scraping?I know I can extract the href and open it, but I thought I saw a method to do this using hpricot and was wondering i开发者_C百科f there w

Is there a method to follow a link using Nokogiri for scraping? I know I can extract the href and open it, but I thought I saw a method to do this using hpricot and was wondering i开发者_C百科f there was something like that in Nokogiri.


Here is an excellent screen scraping guide for using Ruby, Nokigiri, Hpricot, and Firebug.

Personally I am a big fan of using Mechanize, which is a headless browser, for screen scraping. You can use mechanize to navigate links and fill out forms and it will handle all the tricky stuff like cookies.

0

精彩评论

暂无评论...
验证码 换一张
取 消