Class: OpenDMM::Engine::TokyoHot::MovieK

Inherits:
Movie
  • Object
show all
Defined in:
lib/opendmm/engines/tokyo_hot.rb

Instance Method Summary collapse

Methods inherited from Movie

#details

Constructor Details

#initialize(query) ⇒ MovieK

Returns a new instance of MovieK.



57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/opendmm/engines/tokyo_hot.rb', line 57

def initialize(query)
  super(query, Site.list_k)

  @details.code         = "Tokyo Hot #{query}"
  @details.maker        = 'Tokyo Hot'

  link = @html.at_xpath("//a[contains(@href, '#{@query}')]")
  @details.page         = link['href']
  @details.cover_image  = link.at_css('img')['src']

  table = link.ancestors('table').first
  @details.title        = table.at_xpath('tr[1]').text.remove('-').squish
  if @details.title =~ /餌食牝\s(.*)/
    @details.actresses = $1.squish.split
    @details.title = '餌食牝'
  end
  @details.release_date = table.at_xpath('tr[2]').text.remove('更新日')
end