34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# File 'lib/opendmm/search_engines/dmm.rb', line 34
def self.parse_item(content)
page_uri = content.request.last_uri
html = Nokogiri::HTML(content)
specs = Utils.hash_by_split(html.css('//*[@id="mu"]/div/table/tr/td[1]/table/tr').map(&:text))
return {
actresses: specs['出演者'].split,
code: specs['品番'],
cover_image: html.at_css('#sample-video > a')['href'],
directors: specs['監督'].split,
genres: specs['ジャンル'].split,
label: specs['レーベル'],
maker: specs['メーカー'],
movie_length: specs['収録時間'],
page: page_uri.to_s,
release_date: specs['商品発売日'],
series: specs['シリーズ'],
thumbnail_image: html.at_css('#sample-video > a > img')['src'],
title: html.css('#title').text,
}
end
|