opendmm 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +2 -0
  3. data/.travis.yml +4 -0
  4. data/Gemfile +3 -0
  5. data/README.md +9 -0
  6. data/Rakefile +77 -0
  7. data/bin/opendmm +24 -0
  8. data/lib/opendmm.rb +9 -0
  9. data/lib/opendmm/maker.rb +60 -0
  10. data/lib/opendmm/makers/aknr.rb +38 -0
  11. data/lib/opendmm/makers/ako3.rb +39 -0
  12. data/lib/opendmm/makers/anna_and_hanako.rb +40 -0
  13. data/lib/opendmm/makers/apa.rb +40 -0
  14. data/lib/opendmm/makers/aroma.rb +63 -0
  15. data/lib/opendmm/makers/attackers.rb +55 -0
  16. data/lib/opendmm/makers/aurora.rb +45 -0
  17. data/lib/opendmm/makers/baltan.rb +40 -0
  18. data/lib/opendmm/makers/befree.rb +42 -0
  19. data/lib/opendmm/makers/bi.rb +44 -0
  20. data/lib/opendmm/makers/bijin_majo.rb +39 -0
  21. data/lib/opendmm/makers/candy.rb +41 -0
  22. data/lib/opendmm/makers/caribbean.rb +40 -0
  23. data/lib/opendmm/makers/dip.rb +43 -0
  24. data/lib/opendmm/makers/dmm_collection.rb +39 -0
  25. data/lib/opendmm/makers/ebody.rb +42 -0
  26. data/lib/opendmm/makers/ideapocket.rb +68 -0
  27. data/lib/opendmm/makers/kawaii.rb +41 -0
  28. data/lib/opendmm/makers/kira_kira.rb +41 -0
  29. data/lib/opendmm/makers/madonna.rb +41 -0
  30. data/lib/opendmm/makers/moodyz.rb +48 -0
  31. data/lib/opendmm/makers/munekyunkissa.rb +42 -0
  32. data/lib/opendmm/makers/opera.rb +47 -0
  33. data/lib/opendmm/makers/oppai.rb +57 -0
  34. data/lib/opendmm/makers/premium.rb +43 -0
  35. data/lib/opendmm/makers/prestige.rb +66 -0
  36. data/lib/opendmm/makers/s1.rb +41 -0
  37. data/lib/opendmm/makers/sod.rb +44 -0
  38. data/lib/opendmm/makers/tameikegoro.rb +42 -0
  39. data/lib/opendmm/makers/to_satsu.rb +40 -0
  40. data/lib/opendmm/makers/waap.rb +46 -0
  41. data/lib/opendmm/search_engines/jav_library.rb +58 -0
  42. data/lib/opendmm/utils.rb +119 -0
  43. data/lib/opendmm/version.rb +3 -0
  44. data/opendmm.gemspec +25 -0
  45. data/test/fixtures/ABP-013.json +33 -0
  46. data/test/fixtures/ABS-014.json +31 -0
  47. data/test/fixtures/ABY-003.json +32 -0
  48. data/test/fixtures/ADN-019.json +37 -0
  49. data/test/fixtures/AIR-017.json +34 -0
  50. data/test/fixtures/AKO-011.json +20 -0
  51. data/test/fixtures/ALB-182.json +31 -0
  52. data/test/fixtures/ANND-066.json +29 -0
  53. data/test/fixtures/AP-001.json +24 -0
  54. data/test/fixtures/APAA-182.json +38 -0
  55. data/test/fixtures/APAK-051.json +42 -0
  56. data/test/fixtures/ARM-191.json +28 -0
  57. data/test/fixtures/ARMG-223.json +27 -0
  58. data/test/fixtures/ATID-183.json +41 -0
  59. data/test/fixtures/BBI-104.json +33 -0
  60. data/test/fixtures/BEB-001.json +35 -0
  61. data/test/fixtures/BF-175.json +31 -0
  62. data/test/fixtures/BID-017.json +40 -0
  63. data/test/fixtures/BIJN-006.json +25 -0
  64. data/test/fixtures/BLK-049.json +27 -0
  65. data/test/fixtures/BRA-002.json +34 -0
  66. data/test/fixtures/BWB-005.json +31 -0
  67. data/test/fixtures/CHN-008.json +31 -0
  68. data/test/fixtures/CHS-015.json +32 -0
  69. data/test/fixtures/CLUB-003.json +22 -0
  70. data/test/fixtures/CND-012.json +29 -0
  71. data/test/fixtures/CWM-156.json +34 -0
  72. data/test/fixtures/Carib 021511-620.json +27 -0
  73. data/test/fixtures/DCOL-017.json +25 -0
  74. data/test/fixtures/DGL-007.json +24 -0
  75. data/test/fixtures/DOM-045.json +36 -0
  76. data/test/fixtures/EBOD-109.json +30 -0
  77. data/test/fixtures/ECB-078.json +33 -0
  78. data/test/fixtures/EDD-189.json +33 -0
  79. data/test/fixtures/ESK-232.json +31 -0
  80. data/test/fixtures/EZD-369.json +32 -0
  81. data/test/fixtures/FSET-399.json +40 -0
  82. data/test/fixtures/HAZ-009.json +33 -0
  83. data/test/fixtures/HON-001.json +31 -0
  84. data/test/fixtures/IDBD-447.json +32 -0
  85. data/test/fixtures/INU-013.json +34 -0
  86. data/test/fixtures/IPSD-041.json +40 -0
  87. data/test/fixtures/IPTD-464.json +35 -0
  88. data/test/fixtures/IPTD-629.json +32 -0
  89. data/test/fixtures/IPZ-005.json +35 -0
  90. data/test/fixtures/JBD-153.json +42 -0
  91. data/test/fixtures/JBS-004.json +32 -0
  92. data/test/fixtures/JOB-010.json +33 -0
  93. data/test/fixtures/JUC-285.json +36 -0
  94. data/test/fixtures/JUFD-137.json +33 -0
  95. data/test/fixtures/JUX-007.json +35 -0
  96. data/test/fixtures/JUX-119.json +35 -0
  97. data/test/fixtures/KAWD-249.json +30 -0
  98. data/test/fixtures/KIRD-147.json +28 -0
  99. data/test/fixtures/KISD-042.json +32 -0
  100. data/test/fixtures/LLR-005.json +35 -0
  101. data/test/fixtures/MAS-042.json +36 -0
  102. data/test/fixtures/MBD-148.json +32 -0
  103. data/test/fixtures/MDC-002.json +33 -0
  104. data/test/fixtures/MDYD-544.json +34 -0
  105. data/test/fixtures/MEK-008.json +32 -0
  106. data/test/fixtures/MIAD-490.json +34 -0
  107. data/test/fixtures/MIDD-599.json +36 -0
  108. data/test/fixtures/MIDD-643.json +32 -0
  109. data/test/fixtures/MIDD-644.json +30 -0
  110. data/test/fixtures/MIDE-004.json +34 -0
  111. data/test/fixtures/MIGD-284.json +34 -0
  112. data/test/fixtures/MIGD-336.json +33 -0
  113. data/test/fixtures/MIGD-337.json +35 -0
  114. data/test/fixtures/MIMK-005.json +36 -0
  115. data/test/fixtures/MINT-004.json +35 -0
  116. data/test/fixtures/MIQD-010.json +27 -0
  117. data/test/fixtures/MIRD-071.json +41 -0
  118. data/test/fixtures/MIRD-072.json +47 -0
  119. data/test/fixtures/MIRD-073.json +38 -0
  120. data/test/fixtures/MIXS-005.json +34 -0
  121. data/test/fixtures/MMY-010.json +32 -0
  122. data/test/fixtures/NAGE-001.json +33 -0
  123. data/test/fixtures/NDR-001.json +32 -0
  124. data/test/fixtures/NOF-003.json +36 -0
  125. data/test/fixtures/NPS-130.json +18 -0
  126. data/test/fixtures/OBA-045.json +35 -0
  127. data/test/fixtures/ONSD-570.json +29 -0
  128. data/test/fixtures/OPUD-125.json +46 -0
  129. data/test/fixtures/OSR-003.json +32 -0
  130. data/test/fixtures/PARM-028.json +21 -0
  131. data/test/fixtures/PBD-134.json +29 -0
  132. data/test/fixtures/PGD-306.json +34 -0
  133. data/test/fixtures/PJD-085.json +31 -0
  134. data/test/fixtures/PPB-008.json +31 -0
  135. data/test/fixtures/PPP-001.json +45 -0
  136. data/test/fixtures/PPPD-102.json +33 -0
  137. data/test/fixtures/PPSD-028.json +40 -0
  138. data/test/fixtures/PPT-004.json +31 -0
  139. data/test/fixtures/PTS-230.json +17 -0
  140. data/test/fixtures/PTV-001.json +28 -0
  141. data/test/fixtures/PXD-027.json +37 -0
  142. data/test/fixtures/RAW-005.json +32 -0
  143. data/test/fixtures/RBD-183.json +40 -0
  144. data/test/fixtures/SAD-031.json +35 -0
  145. data/test/fixtures/SDDE-312.json +34 -0
  146. data/test/fixtures/SDMT-802.json +32 -0
  147. data/test/fixtures/SDMU-008.json +38 -0
  148. data/test/fixtures/SDNM-011.json +37 -0
  149. data/test/fixtures/SET-007.json +32 -0
  150. data/test/fixtures/SGA-001.json +31 -0
  151. data/test/fixtures/SHKD-415.json +38 -0
  152. data/test/fixtures/SNIS-041.json +34 -0
  153. data/test/fixtures/SOE-259.json +31 -0
  154. data/test/fixtures/SPC-001.json +31 -0
  155. data/test/fixtures/SPS-008.json +32 -0
  156. data/test/fixtures/SRS-015.json +32 -0
  157. data/test/fixtures/SSPD-077.json +44 -0
  158. data/test/fixtures/STAR-359.json +33 -0
  159. data/test/fixtures/SUPD-065.json +41 -0
  160. data/test/fixtures/TDT-018.json +31 -0
  161. data/test/fixtures/TMAM-034.json +14 -0
  162. data/test/fixtures/TMCY-039.json +14 -0
  163. data/test/fixtures/TMDI-040.json +14 -0
  164. data/test/fixtures/TMEM-044.json +14 -0
  165. data/test/fixtures/TMVI-042.json +14 -0
  166. data/test/fixtures/TRD-062.json +31 -0
  167. data/test/fixtures/URE-011.json +38 -0
  168. data/test/fixtures/WA-201.json +17 -0
  169. data/test/fixtures/WAT-003.json +33 -0
  170. data/test/fixtures/WPC-002.json +35 -0
  171. data/test/fixtures/WSS-231.json +33 -0
  172. data/test/fixtures/XND-023.json +32 -0
  173. data/test/fixtures/XV-100.json +18 -0
  174. data/test/fixtures/XV-1000.json +24 -0
  175. data/test/fixtures/YRH-008.json +35 -0
  176. data/test/fixtures/YRZ-009.json +32 -0
  177. data/test/fixtures/ZEX-068.json +18 -0
  178. data/test/fixtures_test.rb +76 -0
  179. metadata +454 -0
@@ -0,0 +1,45 @@
1
+ module OpenDMM
2
+ module Maker
3
+ module Aurora
4
+ include Maker
5
+
6
+ module Site
7
+ include HTTParty
8
+ base_uri 'www.aurora-pro.com'
9
+
10
+ def self.item(name)
11
+ case name
12
+ when /^(APAA|APAK)-?(\d{3})$/i
13
+ get("/shop/-/product/p/goods_id=#{$1.upcase}-#{$2}")
14
+ end
15
+ end
16
+ end
17
+
18
+ module Parser
19
+ def self.parse(content)
20
+ page_uri = content.request.last_uri
21
+ html = Nokogiri::HTML(content)
22
+ specs = Utils.hash_from_dl(html.css('div#product_info dl'))
23
+ return {
24
+ actresses: specs['出演女優'].css('ul li').map(&:text),
25
+ actress_types: specs['女優タイプ'].css('ul li').map(&:text),
26
+ code: specs['作品番号'].text,
27
+ cover_image: html.at_css('div.main_pkg a img')['src'],
28
+ description: html.css('div#product_exp p').text,
29
+ directors: specs['監督'].css('ul li').map(&:text),
30
+ genres: specs['ジャンル'].css('ul li').map(&:text),
31
+ label: specs['レーベル'],
32
+ maker: 'Apache Project',
33
+ movie_length: specs['収録時間'].text,
34
+ page: page_uri.to_s,
35
+ release_date: specs['発売日'].text,
36
+ sample_images: html.css('div.product_scene ul li img').map { |img| img['src'] },
37
+ thumbnail_image: html.at_css('div.main_pkg a img')['src'],
38
+ scenes: specs['シーン'].css('ul li').map(&:text),
39
+ title: html.css('h1.pro_title').text,
40
+ }
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,40 @@
1
+ module OpenDMM
2
+ module Maker
3
+ module Baltan
4
+ include Maker
5
+
6
+ module Site
7
+ include HTTParty
8
+ base_uri 'baltan-av.com'
9
+
10
+ def self.item(name)
11
+ case name
12
+ when /^(TMAM|TMCY|TMDI|TMEM|TMVI)-?(\d{3})$/i
13
+ get("/items/detail/#{$1.upcase}-#{$2}")
14
+ end
15
+ end
16
+ end
17
+
18
+ module Parser
19
+ def self.parse(content)
20
+ page_uri = content.request.last_uri
21
+ html = Nokogiri::HTML(Utils.force_utf8(content))
22
+ return {
23
+ actresses: html.xpath('//*[@id="content1"]/section/div[2]/table/tr[7]/td/a').map(&:text),
24
+ code: html.xpath('//*[@id="content1"]/section/div[2]/table/tr[1]/td').text,
25
+ cover_image: html.at_css('#content1 > section > div.img > img')['src'],
26
+ description: html.css('#content1 > section > p').text,
27
+ label: html.xpath('//*[@id="content1"]/section/div[2]/table/tr[4]/td').text,
28
+ movie_length: html.xpath('//*[@id="content1"]/section/div[2]/table/tr[2]/td').text,
29
+ page: page_uri.to_s,
30
+ release_date: html.xpath('//*[@id="content1"]/section/div[2]/table/tr[3]/td').text,
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
40
+ end
@@ -0,0 +1,42 @@
1
+ module OpenDMM
2
+ module Maker
3
+ module Befree
4
+ include Maker
5
+
6
+ module Site
7
+ include HTTParty
8
+ base_uri 'befreebe.com'
9
+
10
+ def self.item(name)
11
+ case name
12
+ when /^(BF)-?(\d{3})$/i
13
+ get("/works/#{$1.downcase}/#{$1.downcase}#{$2}.html")
14
+ end
15
+ end
16
+ end
17
+
18
+ module Parser
19
+ def self.parse(content)
20
+ page_uri = content.request.last_uri
21
+ html = Nokogiri::HTML(content)
22
+ specs = Utils.hash_from_dl(html.css('#right-navi > dl')).merge(
23
+ Utils.hash_by_split(html.xpath('//*[@id="right-navi"]/div[1]/p[2]').map(&:text)))
24
+ return {
25
+ actresses: html.css('#content > div.main > section > p.actress > a').map(&:text),
26
+ code: specs['品番:'].text,
27
+ cover_image: html.at_css('#content > div.main > section > div.package > img')['src'],
28
+ description: html.css('#content > div.main > section > p.comment').text,
29
+ directors: specs['監督:'].text.split,
30
+ genres: specs['ジャンル:'].css('a').map(&:text),
31
+ movie_length: specs['収録時間'],
32
+ page: page_uri.to_s,
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
42
+ end
@@ -0,0 +1,44 @@
1
+ module OpenDMM
2
+ module Maker
3
+ module Bi
4
+ include Maker
5
+
6
+ module Site
7
+ include HTTParty
8
+ base_uri 'bi-av.com'
9
+
10
+ def self.item(name)
11
+ case name
12
+ when /^(BBI|BEB|BID|BWB)-?(\d{3})$/i
13
+ get("/works/#{$1.downcase}/#{$1.downcase}#{$2}.html")
14
+ end
15
+ end
16
+ end
17
+
18
+ module Parser
19
+ def self.parse(content)
20
+ page_uri = content.request.last_uri
21
+ html = Nokogiri::HTML(content)
22
+ specs = Utils.hash_by_split(html.xpath('//*[@id="content-box"]/div[3]/div[2]/ul/li').map(&:text))
23
+ return {
24
+ actresses: specs['出演女優'].split('/'),
25
+ code: specs['品番'],
26
+ cover_image: html.at_xpath('//*[@id="content-box"]/div[3]/div[1]/a')['href'],
27
+ description: html.xpath('//*[@id="content-box"]/div[3]/div[2]/p').text,
28
+ directors: specs['監督'].split,
29
+ genres: specs['ジャンル'].split('/'),
30
+ label: specs['レーベル'],
31
+ movie_length: specs['収録時間'],
32
+ page: page_uri.to_s,
33
+ release_date: specs['発売日'],
34
+ sample_images: html.xpath('//*[@id="content-box"]/div[3]/div[7]/ul/li/a').map { |a| a['href'] },
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
44
+ end
@@ -0,0 +1,39 @@
1
+ module OpenDMM
2
+ module Maker
3
+ module BijinMajo
4
+ include Maker
5
+
6
+ module Site
7
+ include HTTParty
8
+ base_uri 'bijin-majo-av.com'
9
+
10
+ def self.item(name)
11
+ case name
12
+ when /^(BIJN)-?(\d{3})$/i
13
+ get("/works/#{$1.downcase}/#{$1.downcase}#{$2}.html")
14
+ end
15
+ end
16
+ end
17
+
18
+ module Parser
19
+ def self.parse(content)
20
+ page_uri = content.request.last_uri
21
+ html = Nokogiri::HTML(content)
22
+ specs = Utils.hash_from_dl(html.css('#detail_main > div.detail_item > dl'))
23
+ return {
24
+ actresses: [ html.css('#detail_main > h2').children.first.text ],
25
+ code: specs['品番:'].text,
26
+ cover_image: html.at_css('#detail_main > div.figure > a')['href'],
27
+ description: html.css('#detail_main > div.detail_item > p').text,
28
+ movie_length: specs['収録時間:'].text,
29
+ page: page_uri.to_s,
30
+ release_date: specs['発売日:'].text,
31
+ sample_images: html.css('#detail_photo > ul > li > a').map { |a| a['href'] },
32
+ thumbnail_image: html.at_css('#detail_main > div.figure > a > img')['src'],
33
+ title: html.css('#detail_main > h2').text,
34
+ }
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,41 @@
1
+ module OpenDMM
2
+ module Maker
3
+ module Candy
4
+ include Maker
5
+
6
+ module Site
7
+ include HTTParty
8
+ base_uri 'candy-av.com'
9
+
10
+ def self.item(name)
11
+ case name
12
+ when /^(CND)-?(\d{3})$/i
13
+ get("/works/-/detail/=/cid=#{$1.downcase}#{$2}")
14
+ end
15
+ end
16
+ end
17
+
18
+ module Parser
19
+ def self.parse(content)
20
+ page_uri = content.request.last_uri
21
+ html = Nokogiri::HTML(content)
22
+ specs = Utils.hash_from_dl(html.css('#actress > div > dl'))
23
+ return {
24
+ actresses: specs['出演女優'].css('a').map(&:text),
25
+ code: specs['品番'].text,
26
+ cover_image: html.at_xpath('//*[@id="thumbnail"]/a[1]')['href'],
27
+ description: html.css('#brand > p.p_actress_detail').text,
28
+ genres: specs['ジャンル'].css('a').map(&:text),
29
+ movie_length: specs['収録時間'].text,
30
+ page: page_uri.to_s,
31
+ release_date: specs['発売日'].text,
32
+ sample_images: html.css('#brand > div.photo_sumple > ul > li > a').map { |a| a['href'] },
33
+ thumbnail_image: html.at_xpath('//*[@id="thumbnail"]/a[1]/img')['src'],
34
+ series: specs['シリーズ'].text,
35
+ title: html.css('#brand > div.m_t_4 > h3').text,
36
+ }
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,40 @@
1
+ module OpenDMM
2
+ module Maker
3
+ module Caribbean
4
+ include Maker
5
+
6
+ module Site
7
+ include HTTParty
8
+ base_uri 'www.caribbeancom.com'
9
+
10
+ def self.item(name)
11
+ case name
12
+ when /^Carib ?(\d{6})[-_](\d{3})$/i
13
+ get("/moviepages/#{$1}-#{$2}/index.html")
14
+ end
15
+ end
16
+ end
17
+
18
+ module Parser
19
+ def self.parse(content)
20
+ page_uri = content.request.last_uri
21
+ html = Nokogiri::HTML(content)
22
+ specs = Utils.hash_by_split(html.css('#main-content > div.main-content-movieinfo > div.movie-info > dl').map(&:text))
23
+ return {
24
+ actresses: specs['出演'].split,
25
+ categories: specs['カテゴリー'].split,
26
+ code: "Carib " + page_uri.to_s.match(/\d{6}-\d{3}/)[0],
27
+ cover_image: "./images/l_l.jpg",
28
+ description: html.css('#main-content > div.main-content-movieinfo > div.movie-comment').text,
29
+ movie_length: specs['再生時間'],
30
+ page: page_uri.to_s,
31
+ release_date: specs['配信日'],
32
+ sample_images: html.css('#main-content > div.detail-content.detail-content-gallery-old > table > tr > td > a').map{ |a| a['href'] }.reject{ |uri| uri =~ /\/member\// },
33
+ thumbnail_image: "./images/l_s.jpg",
34
+ title: html.css('#main-content > div.main-content-movieinfo > div.video-detail > span.movie-title > h1').text,
35
+ }
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,43 @@
1
+ module OpenDMM
2
+ module Maker
3
+ module Dip
4
+ include Maker
5
+
6
+ module Site
7
+ include HTTParty
8
+ base_uri 'dip-av.jp'
9
+
10
+ def self.item(name)
11
+ case name
12
+ when /^(NPS|PTS|WA|ZEX)-?(\d{3})$/i
13
+ get("/detail.php?hinban=#{$1.upcase}-#{$2}")
14
+ end
15
+ end
16
+ end
17
+
18
+ module Parser
19
+ def self.parse(content)
20
+ page_uri = content.request.last_uri
21
+ html = Nokogiri::HTML(content)
22
+ specs = Utils.hash_by_split(html.css('#main > div.detail > div.actor').map(&:text)).merge(
23
+ Utils.hash_by_split(html.xpath('//*[@id="main"]/div[@class="detail"]/div[not(@class)]').text.lines))
24
+ return {
25
+ actresses: specs['出演者'].try(:split),
26
+ code: specs['品番'],
27
+ cover_image: html.at_css('#main > div.detail > a')['href'],
28
+ description: html.css('#main > div.detail > div.comment').text,
29
+ genres: specs['ジャンル'].try(:split),
30
+ label: specs['レーベル'],
31
+ maker: specs['メーカー'],
32
+ movie_length: specs['収録時間'],
33
+ page: page_uri.to_s,
34
+ release_date: specs['品番'],
35
+ series: specs['シリーズ'],
36
+ thumbnail_image: html.at_css('#main > div.detail > a > img')['src'],
37
+ title: html.css('#main > h1').text,
38
+ }
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,39 @@
1
+ module OpenDMM
2
+ module Maker
3
+ module DmmCollection
4
+ include Maker
5
+
6
+ module Site
7
+ include HTTParty
8
+ base_uri 'dmm-collection.com'
9
+
10
+ def self.item(name)
11
+ case name
12
+ when /^(DCOL|DGL)-?(\d{3})$/i
13
+ get("/works/-/detail/=/cid=#{$1.downcase}#{$2}")
14
+ end
15
+ end
16
+ end
17
+
18
+ module Parser
19
+ def self.parse(content)
20
+ page_uri = content.request.last_uri
21
+ html = Nokogiri::HTML(content)
22
+ specs = Utils.hash_from_dl(html.xpath('//*[@id="information"]/dl[2]'))
23
+ return {
24
+ actresses: html.css('#information > dl.actress > dd > a').map(&:text),
25
+ code: specs['品番'].text,
26
+ cover_image: html.at_xpath('//*[@id="package"]/h4/a')['href'],
27
+ description: html.xpath('//*[@id="comment"]/h5').text,
28
+ movie_length: specs['収録時間'].text,
29
+ page: page_uri.to_s,
30
+ release_date: specs['DVD発売日'].text,
31
+ sample_images: html.xpath('//*[@id="photo"]/ul/li/a').map { |a| a['href'] },
32
+ thumbnail_image: html.at_xpath('//*[@id="package"]/h4/a/img')['src'],
33
+ title: html.xpath('//*[@id="information"]/h3').text,
34
+ }
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,42 @@
1
+ module OpenDMM
2
+ module Maker
3
+ module EBody
4
+ include Maker
5
+
6
+ module Site
7
+ include HTTParty
8
+ base_uri 'av-e-body.com'
9
+
10
+ def self.item(name)
11
+ case name
12
+ when /^(EBOD)-?(\d{3})$/i
13
+ get("/works/#{$1.downcase}/#{$1.downcase}#{$2}.html")
14
+ end
15
+ end
16
+ end
17
+
18
+ module Parser
19
+ def self.parse(content)
20
+ page_uri = content.request.last_uri
21
+ html = Nokogiri::HTML(content)
22
+ specs = Utils.hash_from_dl(html.css('div.title-data > dl')).merge(
23
+ Utils.hash_by_split(html.xpath('//*[@id="content"]/div/div[3]/div[1]/p').text.lines))
24
+ return {
25
+ actresses: specs['出演女優'].css('a').map(&:text),
26
+ code: specs['品番'],
27
+ cover_image: html.at_css('div.package > a.package-pic')["href"],
28
+ description: html.css('div.title-data > p.comment').text,
29
+ genres: specs['ジャンル'].css('a').map(&:text),
30
+ movie_length: specs['収録時間'],
31
+ page: page_uri.to_s,
32
+ release_date: specs['発売日'].text,
33
+ sample_images: html.css('div.sample-box > ul.sample-pic > li > a').map { |a| a["href"] },
34
+ thumbnail_image: html.at_css('#content > div > div.left-box > div.package > a > img')['src'],
35
+ series: specs['シリーズ'].text.remove(':'),
36
+ title: html.css('div.title-data > h1').text,
37
+ }
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,68 @@
1
+ module OpenDMM
2
+ module Maker
3
+ module Ideapocket
4
+ include Maker
5
+
6
+ module Site
7
+ include HTTParty
8
+ base_uri 'ideapocket.com'
9
+
10
+ def self.item(name)
11
+ case name
12
+ when /^(IDBD|IPSD|IPTD|IPZ|SUPD)-?(\d{3})$/i
13
+ get("/works/-/detail/=/cid=#{$1.downcase}#{$2}")
14
+ end
15
+ end
16
+ end
17
+
18
+ module Parser
19
+ def self.parse(content)
20
+ page_uri = content.request.last_uri
21
+ html = Nokogiri::HTML(content)
22
+ specs = parse_specs(html)
23
+ return {
24
+ actresses: html.xpath('//*[@id="content-box"]/p[1]').text.split('/'),
25
+ code: specs['品番']['DVD'],
26
+ cover_image: html.at_css('div#content-box div.pake a')['href'],
27
+ directors: specs['監督'].split,
28
+ description: html.xpath('//*[@id="content-box"]/p[2]').text,
29
+ genres: specs['ジャンル'].split,
30
+ label: specs['レーベル'],
31
+ maker: 'Ideapocket',
32
+ movie_length: specs['収録時間']['DVD'],
33
+ page: page_uri.to_s,
34
+ release_date: specs['発売日']['DVD'],
35
+ sample_images: html.css('div#sample-pic a').map { |a| a['href'] },
36
+ thumbnail_image: html.at_css('#content-box > div.pake > a > img')['src'],
37
+ series: specs['シリーズ'],
38
+ title: html.css('div#content-box h2.list-ttl').text,
39
+ }
40
+ end
41
+
42
+ private
43
+
44
+ def self.parse_specs(html)
45
+ specs = {}
46
+ last_key = nil
47
+ html.xpath('//*[@id="navi-right"]/div[1]/p').text.lines do |line|
48
+ if line =~ /(.*):(.*)/
49
+ specs[$1.squish] = $2.squish
50
+ last_key = $1.squish
51
+ else
52
+ specs[last_key] += line.squish
53
+ end
54
+ end
55
+ specs.each do |key, value|
56
+ tokens = value.squish.split(/(Blu-ray|DVD)/)
57
+ tokens = tokens.delete_if(&:empty?).map(&:squish)
58
+ case tokens.size
59
+ when 2,4
60
+ specs[key] = Hash[*tokens]
61
+ end
62
+ end
63
+ specs
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end