opendmm 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -0
- data/Rakefile +35 -27
- data/bin/opendmm +7 -7
- data/lib/opendmm.rb +35 -26
- data/lib/opendmm/maker.rb +18 -59
- data/lib/opendmm/makers/aknr.rb +18 -34
- data/lib/opendmm/makers/ako3.rb +18 -34
- data/lib/opendmm/makers/anna_and_hanako.rb +20 -36
- data/lib/opendmm/makers/apa.rb +19 -35
- data/lib/opendmm/makers/aroma.rb +40 -54
- data/lib/opendmm/makers/attackers.rb +30 -48
- data/lib/opendmm/makers/aurora.rb +24 -40
- data/lib/opendmm/makers/baltan.rb +20 -36
- data/lib/opendmm/makers/befree.rb +22 -38
- data/lib/opendmm/makers/bi.rb +24 -40
- data/lib/opendmm/makers/bijin_majo.rb +19 -35
- data/lib/opendmm/makers/candy.rb +27 -43
- data/lib/opendmm/makers/caribbean.rb +21 -36
- data/lib/opendmm/makers/cross.rb +22 -39
- data/lib/opendmm/makers/dip.rb +22 -38
- data/lib/opendmm/makers/dmm_collection.rb +19 -35
- data/lib/opendmm/makers/ebody.rb +22 -38
- data/lib/opendmm/makers/ideapocket.rb +42 -60
- data/lib/opendmm/makers/kawaii.rb +21 -37
- data/lib/opendmm/makers/kira_kira.rb +21 -37
- data/lib/opendmm/makers/madonna.rb +21 -37
- data/lib/opendmm/makers/moodyz.rb +41 -44
- data/lib/opendmm/makers/munekyunkissa.rb +21 -37
- data/lib/opendmm/makers/opera.rb +27 -43
- data/lib/opendmm/makers/oppai.rb +33 -51
- data/lib/opendmm/makers/premium.rb +23 -39
- data/lib/opendmm/makers/prestige.rb +40 -58
- data/lib/opendmm/makers/ran_maru.rb +29 -46
- data/lib/opendmm/makers/s1.rb +21 -37
- data/lib/opendmm/makers/s_cute.rb +41 -55
- data/lib/opendmm/makers/sod.rb +23 -39
- data/lib/opendmm/makers/tameikegoro.rb +22 -38
- data/lib/opendmm/makers/to_satsu.rb +20 -36
- data/lib/opendmm/makers/waap.rb +24 -41
- data/lib/opendmm/search_engine.rb +20 -0
- data/lib/opendmm/search_engines/dmm.rb +38 -58
- data/lib/opendmm/search_engines/jav_library.rb +32 -63
- data/lib/opendmm/site.rb +73 -0
- data/lib/opendmm/utils.rb +22 -2
- data/lib/opendmm/version.rb +1 -1
- data/test/{fixtures → dmm_fixtures}/DMYJ-001.json +1 -1
- data/test/fixture_test.rb +17 -13
- data/test/{fixtures → jav_library_fixtures}/XV-100.json +0 -0
- data/test/{fixtures → jav_library_fixtures}/XV-1000.json +0 -0
- data/test/{fixtures → maker_fixtures}/ABP-013.json +0 -0
- data/test/{fixtures → maker_fixtures}/ABS-014.json +0 -0
- data/test/{fixtures → maker_fixtures}/ABY-003.json +0 -0
- data/test/{fixtures → maker_fixtures}/ADN-019.json +0 -0
- data/test/{fixtures → maker_fixtures}/AIR-017.json +1 -1
- data/test/{fixtures → maker_fixtures}/AKO-011.json +1 -1
- data/test/{fixtures → maker_fixtures}/ALB-182.json +0 -0
- data/test/{fixtures → maker_fixtures}/ANND-066.json +0 -0
- data/test/{fixtures → maker_fixtures}/AP-001.json +0 -0
- data/test/{fixtures → maker_fixtures}/APAA-182.json +0 -0
- data/test/{fixtures → maker_fixtures}/APAK-051.json +0 -0
- data/test/{fixtures → maker_fixtures}/ARM-191.json +0 -0
- data/test/{fixtures → maker_fixtures}/ARMG-223.json +0 -0
- data/test/{fixtures → maker_fixtures}/ATID-183.json +0 -0
- data/test/{fixtures → maker_fixtures}/BBI-104.json +0 -0
- data/test/{fixtures → maker_fixtures}/BEB-001.json +0 -0
- data/test/{fixtures → maker_fixtures}/BF-175.json +0 -0
- data/test/{fixtures → maker_fixtures}/BID-017.json +0 -0
- data/test/{fixtures → maker_fixtures}/BIJN-006.json +0 -0
- data/test/{fixtures → maker_fixtures}/BLK-049.json +0 -0
- data/test/{fixtures → maker_fixtures}/BRA-002.json +0 -0
- data/test/{fixtures → maker_fixtures}/BWB-005.json +0 -0
- data/test/{fixtures → maker_fixtures}/CHN-008.json +0 -0
- data/test/{fixtures → maker_fixtures}/CHS-015.json +0 -0
- data/test/{fixtures → maker_fixtures}/CLUB-003.json +0 -0
- data/test/{fixtures → maker_fixtures}/CND-012.json +0 -0
- data/test/{fixtures → maker_fixtures}/CND-062.json +0 -0
- data/test/{fixtures → maker_fixtures}/CRAD-099.json +0 -0
- data/test/{fixtures → maker_fixtures}/CRPD-451.json +0 -0
- data/test/{fixtures → maker_fixtures}/CRSS-013.json +0 -0
- data/test/{fixtures → maker_fixtures}/CWM-156.json +1 -1
- data/test/fixtures/Carib 021511-620.json b/data/test/maker_fixtures/Carib → 021511-620.json +0 -0
- data/test/{fixtures → maker_fixtures}/DCOL-017.json +1 -1
- data/test/{fixtures → maker_fixtures}/DGL-007.json +1 -1
- data/test/{fixtures → maker_fixtures}/DOM-045.json +0 -0
- data/test/{fixtures → maker_fixtures}/EBOD-109.json +0 -0
- data/test/{fixtures → maker_fixtures}/ECB-078.json +1 -1
- data/test/{fixtures → maker_fixtures}/EDD-189.json +0 -0
- data/test/{fixtures → maker_fixtures}/ESK-232.json +0 -0
- data/test/{fixtures → maker_fixtures}/EZD-369.json +0 -0
- data/test/{fixtures → maker_fixtures}/FSET-399.json +0 -0
- data/test/{fixtures → maker_fixtures}/HAZ-009.json +0 -0
- data/test/{fixtures → maker_fixtures}/HON-001.json +0 -0
- data/test/{fixtures → maker_fixtures}/IDBD-447.json +0 -0
- data/test/{fixtures → maker_fixtures}/INU-013.json +0 -0
- data/test/{fixtures → maker_fixtures}/IPSD-041.json +0 -0
- data/test/{fixtures → maker_fixtures}/IPTD-464.json +0 -0
- data/test/{fixtures → maker_fixtures}/IPTD-629.json +0 -0
- data/test/{fixtures → maker_fixtures}/IPZ-005.json +0 -0
- data/test/{fixtures → maker_fixtures}/JBD-153.json +0 -0
- data/test/{fixtures → maker_fixtures}/JBS-004.json +0 -0
- data/test/{fixtures → maker_fixtures}/JOB-010.json +0 -0
- data/test/{fixtures → maker_fixtures}/JUC-285.json +0 -0
- data/test/{fixtures → maker_fixtures}/JUFD-137.json +0 -0
- data/test/{fixtures → maker_fixtures}/JUX-007.json +0 -0
- data/test/{fixtures → maker_fixtures}/JUX-119.json +0 -0
- data/test/{fixtures → maker_fixtures}/KAWD-249.json +1 -1
- data/test/{fixtures → maker_fixtures}/KIRD-147.json +0 -0
- data/test/{fixtures → maker_fixtures}/KISD-042.json +0 -0
- data/test/{fixtures → maker_fixtures}/LLR-005.json +0 -0
- data/test/{fixtures → maker_fixtures}/MAS-042.json +0 -0
- data/test/{fixtures → maker_fixtures}/MBD-148.json +0 -0
- data/test/{fixtures → maker_fixtures}/MDC-002.json +0 -0
- data/test/{fixtures → maker_fixtures}/MDYD-544.json +0 -0
- data/test/{fixtures → maker_fixtures}/MEK-008.json +0 -0
- data/test/{fixtures → maker_fixtures}/MIAD-490.json +0 -0
- data/test/{fixtures → maker_fixtures}/MIDD-599.json +0 -0
- data/test/{fixtures → maker_fixtures}/MIDD-643.json +0 -0
- data/test/{fixtures → maker_fixtures}/MIDD-644.json +0 -0
- data/test/{fixtures → maker_fixtures}/MIDE-004.json +0 -0
- data/test/{fixtures → maker_fixtures}/MIGD-284.json +0 -0
- data/test/{fixtures → maker_fixtures}/MIGD-336.json +0 -0
- data/test/{fixtures → maker_fixtures}/MIGD-337.json +0 -0
- data/test/{fixtures → maker_fixtures}/MIMK-005.json +0 -0
- data/test/{fixtures → maker_fixtures}/MINT-004.json +0 -0
- data/test/{fixtures → maker_fixtures}/MIQD-010.json +0 -0
- data/test/{fixtures → maker_fixtures}/MIRD-071.json +0 -0
- data/test/{fixtures → maker_fixtures}/MIRD-072.json +0 -0
- data/test/{fixtures → maker_fixtures}/MIRD-073.json +0 -0
- data/test/{fixtures → maker_fixtures}/MIXS-005.json +0 -0
- data/test/{fixtures → maker_fixtures}/MMY-010.json +0 -0
- data/test/{fixtures → maker_fixtures}/NAGE-001.json +0 -0
- data/test/{fixtures → maker_fixtures}/NDR-001.json +0 -0
- data/test/{fixtures → maker_fixtures}/NOF-003.json +0 -0
- data/test/{fixtures → maker_fixtures}/NPS-130.json +0 -0
- data/test/{fixtures → maker_fixtures}/OBA-045.json +1 -1
- data/test/{fixtures → maker_fixtures}/ONSD-570.json +0 -0
- data/test/{fixtures → maker_fixtures}/OPUD-125.json +1 -1
- data/test/{fixtures → maker_fixtures}/OSR-003.json +0 -0
- data/test/{fixtures → maker_fixtures}/PARM-028.json +0 -0
- data/test/{fixtures → maker_fixtures}/PBD-134.json +0 -0
- data/test/{fixtures → maker_fixtures}/PGD-306.json +0 -0
- data/test/{fixtures → maker_fixtures}/PJD-085.json +0 -0
- data/test/{fixtures → maker_fixtures}/PPB-008.json +0 -0
- data/test/{fixtures → maker_fixtures}/PPP-001.json +0 -0
- data/test/{fixtures → maker_fixtures}/PPPD-102.json +1 -1
- data/test/{fixtures → maker_fixtures}/PPSD-028.json +1 -1
- data/test/{fixtures → maker_fixtures}/PPT-004.json +0 -0
- data/test/{fixtures → maker_fixtures}/PTS-230.json +0 -0
- data/test/{fixtures → maker_fixtures}/PTV-001.json +0 -0
- data/test/{fixtures → maker_fixtures}/PXD-027.json +0 -0
- data/test/{fixtures → maker_fixtures}/RAW-005.json +0 -0
- data/test/{fixtures → maker_fixtures}/RBD-183.json +0 -0
- data/test/fixtures/S-Cute 248_hibiki_07.json b/data/test/maker_fixtures/S-Cute → 248_hibiki_07.json +0 -0
- data/test/fixtures/S-Cute 353_rena_01.json b/data/test/maker_fixtures/S-Cute → 353_rena_01.json +0 -0
- data/test/fixtures/S-Cute ps5_07_rimu.json b/data/test/maker_fixtures/S-Cute → ps5_07_rimu.json +0 -0
- data/test/fixtures/S-Cute ps6_99_reona.json b/data/test/maker_fixtures/S-Cute → ps6_99_reona.json +0 -0
- data/test/fixtures/S-Cute ps7_83_akari2.json b/data/test/maker_fixtures/S-Cute → ps7_83_akari2.json +0 -0
- data/test/fixtures/S-Cute swm_05_risa2.json b/data/test/maker_fixtures/S-Cute → swm_05_risa2.json +0 -0
- data/test/{fixtures → maker_fixtures}/SAD-031.json +0 -0
- data/test/{fixtures → maker_fixtures}/SDDE-312.json +0 -0
- data/test/{fixtures → maker_fixtures}/SDMT-802.json +0 -0
- data/test/{fixtures → maker_fixtures}/SDMU-008.json +0 -0
- data/test/{fixtures → maker_fixtures}/SDNM-011.json +0 -0
- data/test/{fixtures → maker_fixtures}/SET-007.json +0 -0
- data/test/{fixtures → maker_fixtures}/SGA-001.json +1 -0
- data/test/{fixtures → maker_fixtures}/SHKD-415.json +3 -3
- data/test/{fixtures → maker_fixtures}/SNIS-041.json +0 -0
- data/test/{fixtures → maker_fixtures}/SOE-259.json +0 -0
- data/test/{fixtures → maker_fixtures}/SPC-001.json +0 -0
- data/test/{fixtures → maker_fixtures}/SPS-008.json +0 -0
- data/test/{fixtures → maker_fixtures}/SRS-015.json +0 -0
- data/test/{fixtures → maker_fixtures}/SSPD-077.json +0 -0
- data/test/{fixtures → maker_fixtures}/STAR-359.json +0 -0
- data/test/{fixtures → maker_fixtures}/SUPD-065.json +0 -0
- data/test/{fixtures → maker_fixtures}/TDT-018.json +0 -0
- data/test/{fixtures → maker_fixtures}/TMAM-034.json +0 -0
- data/test/{fixtures → maker_fixtures}/TMCY-039.json +0 -0
- data/test/{fixtures → maker_fixtures}/TMDI-040.json +0 -0
- data/test/{fixtures → maker_fixtures}/TMEM-044.json +0 -0
- data/test/{fixtures → maker_fixtures}/TMVI-042.json +0 -0
- data/test/{fixtures → maker_fixtures}/TRD-062.json +0 -0
- data/test/{fixtures → maker_fixtures}/TYOD-232.json +1 -1
- data/test/{fixtures → maker_fixtures}/URE-011.json +0 -0
- data/test/{fixtures → maker_fixtures}/WA-201.json +0 -0
- data/test/{fixtures → maker_fixtures}/WAT-003.json +0 -0
- data/test/{fixtures → maker_fixtures}/WPC-002.json +0 -0
- data/test/{fixtures → maker_fixtures}/WSS-231.json +1 -1
- data/test/{fixtures → maker_fixtures}/XND-023.json +0 -0
- data/test/{fixtures → maker_fixtures}/YRH-008.json +0 -0
- data/test/{fixtures → maker_fixtures}/YRZ-009.json +0 -0
- data/test/{fixtures → maker_fixtures}/ZEX-068.json +0 -0
- metadata +294 -292
data/lib/opendmm/makers/apa.rb
CHANGED
@@ -1,39 +1,23 @@
|
|
1
|
-
|
2
|
-
module Maker
|
3
|
-
module Apache
|
4
|
-
include Maker
|
1
|
+
base_uri 'www.apa-av.jp'
|
5
2
|
|
6
|
-
|
7
|
-
|
3
|
+
register_product(
|
4
|
+
/^(AP)-?(\d{3})$/i,
|
5
|
+
'/list_detail/detail_#{$2}.html',
|
6
|
+
)
|
8
7
|
|
9
|
-
|
10
|
-
case name
|
11
|
-
when /^AP-?(\d{3})$/i
|
12
|
-
get("/list_detail/detail_#{$1}.html")
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
8
|
+
private
|
16
9
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
page: page_uri.to_s,
|
31
|
-
sample_images: html.css('#right > div.detail-main > div.detail_description > ul > li > a').map { |a| a['href'] },
|
32
|
-
thumbnail_image: html.at_css('#right > div.detail-main > div.detail_img > a > img')['src'],
|
33
|
-
title: html.css('div.detail_title_1').text,
|
34
|
-
}
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
10
|
+
def self.parse_product_html(html)
|
11
|
+
specs = Utils.hash_by_split(html.css('ul.detail-main-meta li').map(&:text))
|
12
|
+
{
|
13
|
+
actresses: specs['出演女優'].split(','),
|
14
|
+
cover_image: html.at_css('#right > div.detail-main > div.detail_img > a')['href'],
|
15
|
+
description: html.at_css('#right > div.detail-main > div.detail_description').inner_text,
|
16
|
+
directors: specs['監督'].split,
|
17
|
+
maker: 'Apache',
|
18
|
+
movie_length: specs['収録時間'],
|
19
|
+
sample_images: html.css('#right > div.detail-main > div.detail_description > ul > li > a').map { |a| a['href'] },
|
20
|
+
thumbnail_image: html.at_css('#right > div.detail-main > div.detail_img > a > img')['src'],
|
21
|
+
title: html.css('div.detail_title_1').text,
|
22
|
+
}
|
39
23
|
end
|
data/lib/opendmm/makers/aroma.rb
CHANGED
@@ -1,62 +1,48 @@
|
|
1
|
-
|
2
|
-
module Maker
|
3
|
-
module Aroma
|
4
|
-
include Maker
|
1
|
+
base_uri 'www.aroma-p.com'
|
5
2
|
|
6
|
-
|
7
|
-
|
3
|
+
register_product(
|
4
|
+
/^(ARM)-?(\d{3})$/i,
|
5
|
+
'/member/contents/title.php?conid=101#{$2}',
|
6
|
+
)
|
7
|
+
register_product(
|
8
|
+
/^(ARMG)-?(\d{3})$/i,
|
9
|
+
'/member/contents/title.php?conid=200#{$2}',
|
10
|
+
)
|
11
|
+
register_product(
|
12
|
+
/^(PARM)-?(\d{3})$/i,
|
13
|
+
'/member/contents/title.php?conid=205#{$2}',
|
14
|
+
)
|
8
15
|
|
9
|
-
|
10
|
-
case name
|
11
|
-
when /^ARM-?(\d{3})$/i
|
12
|
-
return get("/member/contents/title.php?conid=101#{$1}")
|
13
|
-
when /^ARMG-?(\d{3})$/i
|
14
|
-
return get("/member/contents/title.php?conid=200#{$1}")
|
15
|
-
when /^PARM-?(\d{3})$/i
|
16
|
-
return get("/member/contents/title.php?conid=205#{$1}")
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
16
|
+
private
|
20
17
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
sample_images: parse_sample_images(html, page_uri),
|
38
|
-
thumbnail_image: html.at_xpath('/html/body/table/tr/td/table/tr[4]/td[2]/table/tr/td[2]/table/tr[3]/td/table/tr[2]/td[2]/table/tr/td[1]/a/img')['src'],
|
39
|
-
title: html.xpath('/html/body/table/tr/td/table/tr[4]/td[2]/table/tr/td[2]/table/tr[3]/td/table/tr[2]/td[2]/table/tr/td[3]/table/tr[1]/td').text,
|
40
|
-
}
|
41
|
-
end
|
42
|
-
|
43
|
-
private
|
18
|
+
def self.parse_product_html(html)
|
19
|
+
specs = Utils.hash_by_split(html.xpath('/html/body/table/tr/td/table/tr[4]/td[2]/table/tr/td[2]/table/tr[3]/td/table/tr[2]/td[2]/table/tr/td[3]/table/tr[3]').text.split)
|
20
|
+
{
|
21
|
+
actresses: specs['出演者'].try(:split, '・'),
|
22
|
+
cover_image: parse_cover_image(html),
|
23
|
+
directors: specs['監督'].try(:split, '・'),
|
24
|
+
description: html.xpath('/html/body/table/tr/td/table/tr[4]/td[2]/table/tr/td[2]/table/tr[3]/td/table/tr[9]/td[2]').text,
|
25
|
+
genres: specs['ジャンル'].split,
|
26
|
+
label: specs['レーベル'],
|
27
|
+
maker: 'Aroma',
|
28
|
+
movie_length: specs['時間'],
|
29
|
+
sample_images: parse_sample_images(html),
|
30
|
+
thumbnail_image: html.at_xpath('/html/body/table/tr/td/table/tr[4]/td[2]/table/tr/td[2]/table/tr[3]/td/table/tr[2]/td[2]/table/tr/td[1]/a/img')['src'],
|
31
|
+
title: html.xpath('/html/body/table/tr/td/table/tr[4]/td[2]/table/tr/td[2]/table/tr[3]/td/table/tr[2]/td[2]/table/tr/td[3]/table/tr[1]/td').text,
|
32
|
+
}
|
33
|
+
end
|
44
34
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
35
|
+
def self.parse_cover_image(html)
|
36
|
+
href = html.at_xpath('/html/body/table/tr/td/table/tr[4]/td[2]/table/tr/td[2]/table/tr[3]/td/table/tr[2]/td[2]/table/tr/td[1]/a')['href']
|
37
|
+
if href =~ /'(\/images\/.*?)'/
|
38
|
+
return $1
|
39
|
+
end
|
40
|
+
end
|
51
41
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
42
|
+
def self.parse_sample_images(html)
|
43
|
+
html.xpath('/html/body/table/tr/td/table/tr[4]/td[2]/table/tr/td[2]/table/tr[3]/td/table/tr[7]/td[2]/table/tr[3]').css('td input').map do |input|
|
44
|
+
if input['onclick'] =~ /'(\/images\/.*?)'/
|
45
|
+
$1
|
60
46
|
end
|
61
47
|
end
|
62
48
|
end
|
@@ -1,54 +1,36 @@
|
|
1
|
-
|
2
|
-
module Maker
|
3
|
-
module Attackers
|
4
|
-
include Maker
|
1
|
+
base_uri 'attackers.net'
|
5
2
|
|
6
|
-
|
7
|
-
|
3
|
+
register_product(
|
4
|
+
/^(ADN|ATID|JBD|RBD|SHKD|SSPD)-?(\d{3})$/i,
|
5
|
+
'/works/-/detail/=/cid=#{$1.downcase}#{$2}',
|
6
|
+
)
|
8
7
|
|
9
|
-
|
10
|
-
case name
|
11
|
-
when /^(ADN|ATID|JBD|RBD|SHKD|SSPD)-?(\d{3})$/i
|
12
|
-
get("/works/-/detail/=/cid=#{$1.downcase}#{$2}")
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
8
|
+
private
|
16
9
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
series: specs['シリーズ'],
|
36
|
-
thumbnail_image: html.at_css('#pake > img')['src'],
|
37
|
-
title: html.css('div.hl_box_btm').text,
|
38
|
-
}
|
39
|
-
end
|
40
|
-
|
41
|
-
private
|
10
|
+
def self.parse_product_html(html)
|
11
|
+
specs = Utils.hash_by_split(html.css('div#works-content ul li').map(&:text))
|
12
|
+
{
|
13
|
+
actresses: specs['出演女優'].split,
|
14
|
+
cover_image: html.at_css('div#works_pake_box a#pake')['href'],
|
15
|
+
directors: specs['監督'].split,
|
16
|
+
description: html.css('p.works_txt').text,
|
17
|
+
genres: specs['ジャンル'].split,
|
18
|
+
label: specs['レーベル'],
|
19
|
+
maker: 'Attackers',
|
20
|
+
movie_length: specs['収録時間'],
|
21
|
+
release_date: specs['発売日'],
|
22
|
+
sample_images: html.css('ul#sample_photo li a').map { |a| a['href'] },
|
23
|
+
series: specs['シリーズ'],
|
24
|
+
thumbnail_image: html.at_css('#pake > img')['src'],
|
25
|
+
title: html.css('div.hl_box_btm').text,
|
26
|
+
}
|
27
|
+
end
|
42
28
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
29
|
+
def self.parse_code(str)
|
30
|
+
case str
|
31
|
+
when /Blu-ray:(\w+-\d+).*DVD:(\w+-\d+)/
|
32
|
+
$2.upcase
|
33
|
+
when /\w+-\d+/
|
34
|
+
$&
|
53
35
|
end
|
54
36
|
end
|
@@ -1,44 +1,28 @@
|
|
1
|
-
|
2
|
-
module Maker
|
3
|
-
module Aurora
|
4
|
-
include Maker
|
1
|
+
base_uri 'www.aurora-pro.com'
|
5
2
|
|
6
|
-
|
7
|
-
|
3
|
+
register_product(
|
4
|
+
/^(APAA|APAK)-?(\d{3})$/i,
|
5
|
+
'/shop/-/product/p/goods_id=#{$1.upcase}-#{$2}',
|
6
|
+
)
|
8
7
|
|
9
|
-
|
10
|
-
case name
|
11
|
-
when /^(APAA|APAK)-?(\d{3})$/i
|
12
|
-
get("/shop/-/product/p/goods_id=#{$1.upcase}-#{$2}")
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
8
|
+
private
|
16
9
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
sample_images: html.css('div.product_scene ul li img').map { |img| img['src'] },
|
36
|
-
thumbnail_image: html.at_css('div.main_pkg a img')['src'],
|
37
|
-
scenes: specs['シーン'].css('ul li').map(&:text),
|
38
|
-
title: html.css('h1.pro_title').text,
|
39
|
-
}
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
10
|
+
def self.parse_product_html(html)
|
11
|
+
specs = Utils.hash_from_dl(html.css('div#product_info dl'))
|
12
|
+
{
|
13
|
+
actresses: specs['出演女優'].css('ul li').map(&:text),
|
14
|
+
actress_types: specs['女優タイプ'].css('ul li').map(&:text),
|
15
|
+
cover_image: html.at_css('div.main_pkg a img')['src'],
|
16
|
+
description: html.css('div#product_exp p').text,
|
17
|
+
directors: specs['監督'].css('ul li').map(&:text),
|
18
|
+
genres: specs['ジャンル'].css('ul li').map(&:text),
|
19
|
+
label: specs['レーベル'],
|
20
|
+
maker: 'Aurora Project',
|
21
|
+
movie_length: specs['収録時間'].text,
|
22
|
+
release_date: specs['発売日'].text,
|
23
|
+
sample_images: html.css('div.product_scene ul li img').map { |img| img['src'] },
|
24
|
+
thumbnail_image: html.at_css('div.main_pkg a img')['src'],
|
25
|
+
scenes: specs['シーン'].css('ul li').map(&:text),
|
26
|
+
title: html.css('h1.pro_title').text,
|
27
|
+
}
|
44
28
|
end
|
@@ -1,40 +1,24 @@
|
|
1
|
-
|
2
|
-
module Maker
|
3
|
-
module Baltan
|
4
|
-
include Maker
|
1
|
+
base_uri 'baltan-av.com'
|
5
2
|
|
6
|
-
|
7
|
-
|
3
|
+
register_product(
|
4
|
+
/^(TMAM|TMCY|TMDI|TMEM|TMVI)-?(\d{3})$/i,
|
5
|
+
'/items/detail/#{$1.upcase}-#{$2}',
|
6
|
+
)
|
8
7
|
|
9
|
-
|
10
|
-
case name
|
11
|
-
when /^(TMAM|TMCY|TMDI|TMEM|TMVI)-?(\d{3})$/i
|
12
|
-
get("/items/detail/#{$1.upcase}-#{$2}")
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
8
|
+
private
|
16
9
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
series: html.xpath('//*[@id="content1"]/section/div[2]/table/tr[5]/td').text,
|
32
|
-
theme: html.xpath('//*[@id="content1"]/section/div[2]/table/tr[6]/td').text,
|
33
|
-
thumbnail_image: html.at_css('#content1 > section > div.img > img')['src'],
|
34
|
-
title: html.css('#content1 > section > h2').text,
|
35
|
-
}
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
10
|
+
def self.parse_product_html(html)
|
11
|
+
{
|
12
|
+
actresses: html.xpath('//*[@id="content1"]/section/div[2]/table/tr[7]/td/a').map(&:text),
|
13
|
+
cover_image: html.at_css('#content1 > section > div.img > img')['src'],
|
14
|
+
description: html.css('#content1 > section > p').text,
|
15
|
+
label: html.xpath('//*[@id="content1"]/section/div[2]/table/tr[4]/td').text,
|
16
|
+
maker: 'Baltan',
|
17
|
+
movie_length: html.xpath('//*[@id="content1"]/section/div[2]/table/tr[2]/td').text,
|
18
|
+
release_date: html.xpath('//*[@id="content1"]/section/div[2]/table/tr[3]/td').text,
|
19
|
+
series: html.xpath('//*[@id="content1"]/section/div[2]/table/tr[5]/td').text,
|
20
|
+
theme: html.xpath('//*[@id="content1"]/section/div[2]/table/tr[6]/td').text,
|
21
|
+
thumbnail_image: html.at_css('#content1 > section > div.img > img')['src'],
|
22
|
+
title: html.css('#content1 > section > h2').text,
|
23
|
+
}
|
40
24
|
end
|
@@ -1,42 +1,26 @@
|
|
1
|
-
|
2
|
-
module Maker
|
3
|
-
module Befree
|
4
|
-
include Maker
|
1
|
+
base_uri 'befreebe.com'
|
5
2
|
|
6
|
-
|
7
|
-
|
3
|
+
register_product(
|
4
|
+
/^(BF)-?(\d{3})$/i,
|
5
|
+
'/works/#{$1.downcase}/#{$1.downcase}#{$2}.html',
|
6
|
+
)
|
8
7
|
|
9
|
-
|
10
|
-
case name
|
11
|
-
when /^(BF)-?(\d{3})$/i
|
12
|
-
get("/works/#{$1.downcase}/#{$1.downcase}#{$2}.html")
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
8
|
+
private
|
16
9
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
release_date: specs['発売日:'].text,
|
34
|
-
sample_images: html.css('#content > div.main > section > ul > li > a').map { |a| a['href'] },
|
35
|
-
thumbnail_image: html.at_css('#content > div.main > section > div.package > img')['src'],
|
36
|
-
title: html.xpath('//*[@id="content"]/div[2]/section/h2[1]').text,
|
37
|
-
}
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
10
|
+
def self.parse_product_html(html)
|
11
|
+
specs = Utils.hash_from_dl(html.css('#right-navi > dl')).merge(
|
12
|
+
Utils.hash_by_split(html.xpath('//*[@id="right-navi"]/div[1]/p[2]').map(&:text)))
|
13
|
+
{
|
14
|
+
actresses: html.css('#content > div.main > section > p.actress > a').map(&:text),
|
15
|
+
cover_image: html.at_css('#content > div.main > section > div.package > img')['src'],
|
16
|
+
description: html.css('#content > div.main > section > p.comment').text,
|
17
|
+
directors: specs['監督:'].text.split,
|
18
|
+
genres: specs['ジャンル:'].css('a').map(&:text),
|
19
|
+
maker: 'BeFree',
|
20
|
+
movie_length: specs['収録時間'],
|
21
|
+
release_date: specs['発売日:'].text,
|
22
|
+
sample_images: html.css('#content > div.main > section > ul > li > a').map { |a| a['href'] },
|
23
|
+
thumbnail_image: html.at_css('#content > div.main > section > div.package > img')['src'],
|
24
|
+
title: html.xpath('//*[@id="content"]/div[2]/section/h2[1]').text,
|
25
|
+
}
|
42
26
|
end
|
data/lib/opendmm/makers/bi.rb
CHANGED
@@ -1,44 +1,28 @@
|
|
1
|
-
|
2
|
-
module Maker
|
3
|
-
module Bi
|
4
|
-
include Maker
|
1
|
+
base_uri 'bi-av.com'
|
5
2
|
|
6
|
-
|
7
|
-
|
3
|
+
register_product(
|
4
|
+
/^(BBI|BEB|BID|BWB)-?(\d{3})$/i,
|
5
|
+
'/works/#{$1.downcase}/#{$1.downcase}#{$2}.html',
|
6
|
+
)
|
8
7
|
|
9
|
-
|
10
|
-
case name
|
11
|
-
when /^(BBI|BEB|BID|BWB)-?(\d{3})$/i
|
12
|
-
get("/works/#{$1.downcase}/#{$1.downcase}#{$2}.html")
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
8
|
+
private
|
16
9
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
thumbnail_image: html.at_xpath('//*[@id="content-box"]/div[3]/div[1]/a/img')['src'],
|
36
|
-
series: specs['シリーズ'],
|
37
|
-
subtitle: html.css('#content-box > p.works-subtl650').text,
|
38
|
-
title: html.xpath('//*[@id="content-box"]/h1').text,
|
39
|
-
}
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
10
|
+
def self.parse_product_html(html)
|
11
|
+
specs = Utils.hash_by_split(html.xpath('//*[@id="content-box"]/div[3]/div[2]/ul/li').map(&:text))
|
12
|
+
{
|
13
|
+
actresses: specs['出演女優'].split('/'),
|
14
|
+
cover_image: html.at_xpath('//*[@id="content-box"]/div[3]/div[1]/a')['href'],
|
15
|
+
description: html.xpath('//*[@id="content-box"]/div[3]/div[2]/p').text,
|
16
|
+
directors: specs['監督'].split,
|
17
|
+
genres: specs['ジャンル'].split('/'),
|
18
|
+
label: specs['レーベル'],
|
19
|
+
maker: '美',
|
20
|
+
movie_length: specs['収録時間'],
|
21
|
+
release_date: specs['発売日'],
|
22
|
+
sample_images: html.xpath('//*[@id="content-box"]/div[3]/div[7]/ul/li/a').map { |a| a['href'] },
|
23
|
+
thumbnail_image: html.at_xpath('//*[@id="content-box"]/div[3]/div[1]/a/img')['src'],
|
24
|
+
series: specs['シリーズ'],
|
25
|
+
subtitle: html.css('#content-box > p.works-subtl650').text,
|
26
|
+
title: html.xpath('//*[@id="content-box"]/h1').text,
|
27
|
+
}
|
44
28
|
end
|