Class: EhbrsRubyUtils::Videos::Opensubtitles::Parsers::Episode
- Inherits:
-
Aranha::Parsers::Html::ItemList
- Object
- Aranha::Parsers::Html::ItemList
- EhbrsRubyUtils::Videos::Opensubtitles::Parsers::Episode
- Defined in:
- lib/ehbrs_ruby_utils/videos/opensubtitles/parsers/episode.rb
Constant Summary collapse
- ITEMS_XPATH =
'//table[@id = "search_results"]/tbody/tr[starts-with(@id, "name")]'
Instance Method Summary collapse
Instance Method Details
#data ⇒ Object
16 17 18 |
# File 'lib/ehbrs_ruby_utils/videos/opensubtitles/parsers/episode.rb', line 16 def data { subtitles: items_data, next_page_href: next_page_href } end |
#items_xpath ⇒ Object
12 13 14 |
# File 'lib/ehbrs_ruby_utils/videos/opensubtitles/parsers/episode.rb', line 12 def items_xpath ITEMS_XPATH end |
#next_page_href ⇒ Object
20 21 22 |
# File 'lib/ehbrs_ruby_utils/videos/opensubtitles/parsers/episode.rb', line 20 def next_page_href nokogiri.at_xpath('//*[@id = "pager"]//a[text() = ">>"]/@href').if_present(&:text) end |