Class: OpenDMM::Engine::TokyoHot::Movie
- Defined in:
- lib/opendmm/engines/tokyo_hot.rb
Instance Method Summary collapse
-
#initialize(query) ⇒ Movie
constructor
A new instance of Movie.
Methods inherited from Movie
Constructor Details
#initialize(query) ⇒ Movie
Returns a new instance of Movie.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/opendmm/engines/tokyo_hot.rb', line 43 def initialize(query) search = Search.new(query, Site.search(query)) super(query, Site.get(search.result)) @details.maker = 'Tokyo Hot' @details.title = @html.at_css('#container > div.pagetitle > h2').text @details.cover_image = @html.at_css('#container > div.movie.cf > div.in > div.flowplayer > video')['poster'] @details.description = @html.at_css('#main > div.contents > div.sentence').text @html.css('#main > div.contents > div.infowrapper > dl > dt').each do |dt| dd = dt.next_element case dt.text when /出演者/ @details.actresses = dd.css('a').map(&:text) when /シリーズ/ @details.series = dd.text when /カテゴリ/ @details.categories = dd.css('a').map(&:text) when /配信開始日/ @details.release_date = dd.text when /収録時間/ @details.movie_length = dd.text when /作品番号/ @details.code = 'Tokyo Hot ' + dd.text end end @details.sample_images = @html.css('#main > div.contents > div.scap > a, #main > div.contents > div.vcap > a').map { |a| a['href'] } end |