Class: PictureFrom::Crawlers::FacebookCrawler::SearchPage

Inherits:
BaseCrawler::Page show all
Defined in:
lib/picture_from/crawlers/facebook_crawler.rb

Instance Method Summary collapse

Methods inherited from BaseCrawler::Page

#open_url

Constructor Details

#initialize(user_info) ⇒ SearchPage

Returns a new instance of SearchPage.



11
12
13
# File 'lib/picture_from/crawlers/facebook_crawler.rb', line 11

def initialize()
  @page = open_url("https://www.facebook.com/search.php?q=#{}")
end

Instance Method Details

#usernamesObject



15
16
17
# File 'lib/picture_from/crawlers/facebook_crawler.rb', line 15

def usernames
  results.map { |result| username_from_url(result['href']) }.compact
end