Class: BestHundredPage

Inherits:
GroupPage show all
Defined in:
lib/etvnet_seek/core/best_hundred_page.rb

Constant Summary

Constants inherited from Page

Page::BASE_URL

Instance Attribute Summary

Attributes inherited from Page

#document

Attributes inherited from ServiceCall

#url

Instance Method Summary collapse

Methods inherited from ItemsPage

#categories, #category_breadcrumbs, #description, #navigation_menu, #page_browser, #page_title, #see_too_items, #title, #title_items

Methods inherited from Page

#initialize

Methods inherited from ServiceCall

#get, #initialize, #post

Constructor Details

This class inherits a constructor from Page

Instance Method Details

#itemsObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/etvnet_seek/core/best_hundred_page.rb', line 5

def items
  parent = document.css(".conteiner .best").at(0).parent
  parent.css("ul.best-list li")

  list = get_typical_items("ul.best-list li", parent)

  node = parent.css("ul.best-list").at(0).next

  unless node.nil?
    link = node.attributes['href'].value
    text = node.children.at(0).content

    list << GroupMediaItem.new(text, link)
  end
end