Class: BookmeterExporter::Crawler

Inherits:
Object
  • Object
show all
Defined in:
lib/bookmeter_exporter/crawler.rb

Instance Method Summary collapse

Constructor Details

#initialize(email, password) ⇒ Crawler

Returns a new instance of Crawler.



11
12
13
14
15
16
# File 'lib/bookmeter_exporter/crawler.rb', line 11

def initialize(email, password)
  @email = email
  @password = password
  @root_url = URI("https://bookmeter.com/")
  @user_id = nil
end

Instance Method Details

#crawlObject



18
19
20
21
22
23
# File 'lib/bookmeter_exporter/crawler.rb', line 18

def crawl
  start_webdriver
  
  book_urls = collect_book_urls
  fetch_books(book_urls)
end