Class: PictureFrom::Crawlers::TwitterCrawler::ProfilePage
- Inherits:
-
BaseCrawler::Page
- Object
- BaseCrawler::Page
- PictureFrom::Crawlers::TwitterCrawler::ProfilePage
- Defined in:
- lib/picture_from/crawlers/twitter_crawler.rb
Instance Method Summary collapse
- #avatar_image ⇒ Object
-
#initialize(username) ⇒ ProfilePage
constructor
A new instance of ProfilePage.
Methods inherited from BaseCrawler::Page
Constructor Details
#initialize(username) ⇒ ProfilePage
Returns a new instance of ProfilePage.
11 12 13 |
# File 'lib/picture_from/crawlers/twitter_crawler.rb', line 11 def initialize(username) @page = open_url("https://twitter.com/#{username}") end |
Instance Method Details
#avatar_image ⇒ Object
15 16 17 |
# File 'lib/picture_from/crawlers/twitter_crawler.rb', line 15 def avatar_image @page.css('.ProfileAvatar-image').first['src'] if @page end |