Class: Bookshark::Crawler
- Inherits:
-
Object
- Object
- Bookshark::Crawler
- Includes:
- FileManager
- Defined in:
- lib/bookshark.rb
Instance Attribute Summary collapse
-
#site ⇒ Object
Returns the value of attribute site.
Instance Method Summary collapse
- #bibliographical_records(options = {}) ⇒ Object
- #books(options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ Crawler
constructor
A new instance of Crawler.
- #publishers ⇒ Object
Methods included from FileManager
#list_directories, #list_files, #save_to
Constructor Details
Instance Attribute Details
#site ⇒ Object
Returns the value of attribute site.
358 359 360 |
# File 'lib/bookshark.rb', line 358 def site @site end |
Instance Method Details
#bibliographical_records(options = {}) ⇒ Object
380 381 382 383 |
# File 'lib/bookshark.rb', line 380 def bibliographical_records( = {}) crawler = Biblionet::Crawlers::BibliographicalRecordCrawler.new() crawler.crawl_and_save end |
#books(options = {}) ⇒ Object
375 376 377 378 |
# File 'lib/bookshark.rb', line 375 def books( = {}) crawler = Biblionet::Crawlers::BookCrawler.new() crawler.crawl_and_save end |
#publishers ⇒ Object
365 366 367 368 369 370 371 372 373 |
# File 'lib/bookshark.rb', line 365 def publishers # crawler = Biblionet::Crawlers::Base.new(start:1, finish:100, step:10) # crawler.spider do |url, path| # puts "URL: #{url}, PATH: #{path}" # end # puts Biblionet::Extractors::Base.new("http://www.biblionet.gr/com/245").page crawler = Biblionet::Crawlers::PublisherCrawler.new crawler.crawl_and_save end |