spidey:爬行和抓取网站的宽松框架

时间:2021-04-27 13:32:01
【文件属性】:
文件名称:spidey:爬行和抓取网站的宽松框架
文件大小:10KB
文件格式:ZIP
更新时间:2021-04-27 13:32:01
Ruby 蜘蛛侠 Spidey提供了一个用于爬网和抓取网站的基本框架。 它的目标是使样板抓取逻辑不会出现在您的代码中。 例子 这个例子蜘蛛抓取的易趣页面,如下链接分类页面,继续拍卖的详细信息页面,最后记录一些擦伤的项目细节的结果。 class EbayPetSuppliesSpider < Spidey :: AbstractSpider handle "http://pet-supplies.shop.ebay.com" , :process_home def process_home ( page , default_data = { } ) page . search ( "#AllCats a[role=menuitem]" ) . each do | a | handle resolve_url ( a . attr ( 'href' ) , page )
【文件预览】:
spidey-master
----.travis.yml(187B)
----Rakefile(124B)
----CONTRIBUTING.md(3KB)
----Gemfile(90B)
----spidey.gemspec(889B)
----examples()
--------ebay_pet_supplies_spider.rb(845B)
----spec()
--------spidey()
--------spec_helper.rb(221B)
----.gitignore(55B)
----CHANGELOG.md(227B)
----lib()
--------spidey()
--------spidey.rb(215B)
----README.md(4KB)
----LICENSE.txt(1KB)

网友评论