19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/opendmm/makers/dmm_collection.rb', line 19
def self.parse(content)
page_uri = content.request.last_uri
html = Nokogiri::HTML(content)
specs = Utils.hash_from_dl(html.xpath('//*[@id="information"]/dl[2]'))
return {
actresses: html.css('#information > dl.actress > dd > a').map(&:text),
code: specs['品番'].text,
cover_image: html.at_xpath('//*[@id="package"]/h4/a')['href'],
description: html.xpath('//*[@id="comment"]/h5').text,
movie_length: specs['収録時間'].text,
page: page_uri.to_s,
release_date: specs['DVD発売日'].text,
sample_images: html.xpath('//*[@id="photo"]/ul/li/a').map { |a| a['href'] },
thumbnail_image: html.at_xpath('//*[@id="package"]/h4/a/img')['src'],
title: html.xpath('//*[@id="information"]/h3').text,
}
end
|