From 6549d4b9c991f6782ddd1838e5f3fca0fe00e187 Mon Sep 17 00:00:00 2001 From: edurenye Date: Sun, 2 Dec 2018 11:42:30 +0100 Subject: [PATCH] 605: Replace Anemone for Medusa web-spider framework --- lib/wraith/spider.rb | 10 +++++----- wraith.gemspec | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/wraith/spider.rb b/lib/wraith/spider.rb index b0ee2a79..52f5cff4 100644 --- a/lib/wraith/spider.rb +++ b/lib/wraith/spider.rb @@ -1,7 +1,7 @@ require "wraith" require "wraith/helpers/logger" require "yaml" -require "anemone" +require "medusa" require "uri" class Wraith::Spider @@ -22,11 +22,11 @@ def initialize(config) def crawl logger.info "Crawling #{wraith.base_domain}" - Anemone.crawl(wraith.base_domain) do |anemone| - anemone.skip_links_like(/\.(#{EXT.join('|')})$/) + Medusa.crawl(wraith.base_domain) do |medusa| + mdusa.skip_links_like(/\.(#{EXT.join('|')})$/) # Add user specified skips - anemone.skip_links_like(wraith.spider_skips) - anemone.on_every_page do |page| + medusa.skip_links_like(wraith.spider_skips) + medusa.on_every_page do |page| logger.info " #{page.url.path}" add_path(page.url.path) end diff --git a/wraith.gemspec b/wraith.gemspec index c7df8311..b443b472 100644 --- a/wraith.gemspec +++ b/wraith.gemspec @@ -24,7 +24,7 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency 'rake' spec.add_runtime_dependency 'image_size' spec.add_runtime_dependency 'mini_magick', "~> 4.8" - spec.add_runtime_dependency 'anemone' + spec.add_runtime_dependency 'medusa-framework' spec.add_runtime_dependency 'robotex' spec.add_runtime_dependency 'log4r' spec.add_runtime_dependency 'thor'