opendmm 0.4.3 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (276) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +3 -133
  3. data/bin/opendmm +21 -18
  4. data/dev.thor +17 -0
  5. data/lib/opendmm.rb +19 -49
  6. data/lib/opendmm/engines/av_entertainments.rb +81 -0
  7. data/lib/opendmm/engines/caribbean.rb +106 -0
  8. data/lib/opendmm/engines/caribbean_pr.rb +65 -0
  9. data/lib/opendmm/engines/heyzo.rb +49 -0
  10. data/lib/opendmm/engines/jav_library.rb +81 -0
  11. data/lib/opendmm/engines/one_pondo.rb +53 -0
  12. data/lib/opendmm/engines/tokyo_hot.rb +78 -0
  13. data/lib/opendmm/movie.rb +106 -0
  14. data/lib/opendmm/utils/chronic_duration.rb +17 -0
  15. data/lib/opendmm/utils/date.rb +19 -0
  16. data/lib/opendmm/utils/httparty.rb +30 -0
  17. data/lib/opendmm/utils/logger.rb +6 -0
  18. data/lib/opendmm/utils/nokogiri.rb +14 -0
  19. data/lib/opendmm/version.rb +1 -1
  20. data/opendmm.gemspec +2 -0
  21. data/templates/engine.tt +33 -0
  22. data/test/flow_test.rb +33 -0
  23. metadata +47 -457
  24. data/.travis.yml +0 -6
  25. data/lib/opendmm/maker.rb +0 -33
  26. data/lib/opendmm/makers/aknr.rb +0 -22
  27. data/lib/opendmm/makers/ako3.rb +0 -22
  28. data/lib/opendmm/makers/apa.rb +0 -23
  29. data/lib/opendmm/makers/aroma.rb +0 -48
  30. data/lib/opendmm/makers/attackers.rb +0 -36
  31. data/lib/opendmm/makers/aurora.rb +0 -29
  32. data/lib/opendmm/makers/baltan.rb +0 -24
  33. data/lib/opendmm/makers/befree.rb +0 -26
  34. data/lib/opendmm/makers/bi.rb +0 -28
  35. data/lib/opendmm/makers/candy.rb +0 -32
  36. data/lib/opendmm/makers/caribbean.rb +0 -25
  37. data/lib/opendmm/makers/caribbeanpr.rb +0 -33
  38. data/lib/opendmm/makers/cross.rb +0 -26
  39. data/lib/opendmm/makers/das.rb +0 -36
  40. data/lib/opendmm/makers/dip.rb +0 -26
  41. data/lib/opendmm/makers/dmm_collection.rb +0 -23
  42. data/lib/opendmm/makers/doc.rb +0 -56
  43. data/lib/opendmm/makers/ebody.rb +0 -26
  44. data/lib/opendmm/makers/g_area.rb +0 -59
  45. data/lib/opendmm/makers/ideapocket.rb +0 -28
  46. data/lib/opendmm/makers/kawaii.rb +0 -25
  47. data/lib/opendmm/makers/kira_kira.rb +0 -25
  48. data/lib/opendmm/makers/madonna.rb +0 -25
  49. data/lib/opendmm/makers/moodyz.rb +0 -45
  50. data/lib/opendmm/makers/munekyunkissa.rb +0 -25
  51. data/lib/opendmm/makers/one_pondo.rb +0 -44
  52. data/lib/opendmm/makers/opera.rb +0 -29
  53. data/lib/opendmm/makers/oppai.rb +0 -39
  54. data/lib/opendmm/makers/premium.rb +0 -26
  55. data/lib/opendmm/makers/prestige.rb +0 -47
  56. data/lib/opendmm/makers/ran_maru.rb +0 -35
  57. data/lib/opendmm/makers/s1.rb +0 -25
  58. data/lib/opendmm/makers/s_cute.rb +0 -47
  59. data/lib/opendmm/makers/sod.rb +0 -27
  60. data/lib/opendmm/makers/tameikegoro.rb +0 -24
  61. data/lib/opendmm/makers/ten_musume.rb +0 -33
  62. data/lib/opendmm/makers/tokyo_247.rb +0 -41
  63. data/lib/opendmm/makers/waap.rb +0 -28
  64. data/lib/opendmm/makers/xxx.rb +0 -43
  65. data/lib/opendmm/makers_broken/anna_and_hanako.rb +0 -24
  66. data/lib/opendmm/makers_broken/high_scene.rb +0 -32
  67. data/lib/opendmm/makers_broken/to_satsu.rb +0 -24
  68. data/lib/opendmm/search_engine.rb +0 -20
  69. data/lib/opendmm/search_engines/av_entertainments.rb +0 -46
  70. data/lib/opendmm/search_engines/dmm.rb +0 -50
  71. data/lib/opendmm/search_engines/jav_library.rb +0 -39
  72. data/lib/opendmm/search_engines/mgstage.rb +0 -41
  73. data/lib/opendmm/site.rb +0 -80
  74. data/lib/opendmm/utils.rb +0 -126
  75. data/test/av_entertainments_fixtures/MKBD-S40.json +0 -36
  76. data/test/av_entertainments_fixtures/SKYHD-108.json +0 -53
  77. data/test/av_entertainments_fixtures/sky107.json +0 -33
  78. data/test/broken/ANND-066.json +0 -30
  79. data/test/broken/BIJN-006.json +0 -26
  80. data/test/broken/CLUB-003.json +0 -23
  81. data/test/broken/HIGH-107.json +0 -29
  82. data/test/broken/SIRO-1088.json +0 -29
  83. data/test/dmm_fixtures/DMYJ-001.json +0 -20
  84. data/test/dmm_fixtures/KHY-009.json +0 -21
  85. data/test/dmm_fixtures/RKI-294.json +0 -31
  86. data/test/dmm_fixtures/dmyj00001.json +0 -20
  87. data/test/dmm_fixtures/dmyj001.json +0 -20
  88. data/test/fixture_test.rb +0 -83
  89. data/test/jav_library_fixtures/DLY-0001.json +0 -21
  90. data/test/jav_library_fixtures/DLY-001.json +0 -18
  91. data/test/jav_library_fixtures/JUFD-379.json +0 -25
  92. data/test/jav_library_fixtures/XV-100.json +0 -18
  93. data/test/jav_library_fixtures/XV-1000.json +0 -24
  94. data/test/jav_library_fixtures/xv100.json +0 -18
  95. data/test/maker_fixtures/10musume 082914_01.json +0 -31
  96. data/test/maker_fixtures/1pondo 011111_006.json +0 -35
  97. data/test/maker_fixtures/1pondo 022506_835.json +0 -8
  98. data/test/maker_fixtures/352_kokona_02.json +0 -26
  99. data/test/maker_fixtures/ABP-013.json +0 -33
  100. data/test/maker_fixtures/ABS-014.json +0 -31
  101. data/test/maker_fixtures/ABY-003.json +0 -32
  102. data/test/maker_fixtures/ADN-019.json +0 -38
  103. data/test/maker_fixtures/ADN-025.json +0 -37
  104. data/test/maker_fixtures/AIR-017.json +0 -34
  105. data/test/maker_fixtures/AKO-011.json +0 -20
  106. data/test/maker_fixtures/ALB-038.json +0 -30
  107. data/test/maker_fixtures/ALB-182.json +0 -31
  108. data/test/maker_fixtures/AP-001.json +0 -24
  109. data/test/maker_fixtures/APAA-182.json +0 -38
  110. data/test/maker_fixtures/APAK-051.json +0 -42
  111. data/test/maker_fixtures/ARM-191.json +0 -28
  112. data/test/maker_fixtures/ARMG-223.json +0 -27
  113. data/test/maker_fixtures/ATID-183.json +0 -41
  114. data/test/maker_fixtures/AVOP-061.json +0 -29
  115. data/test/maker_fixtures/BBI-104.json +0 -34
  116. data/test/maker_fixtures/BEB-001.json +0 -36
  117. data/test/maker_fixtures/BF-175.json +0 -32
  118. data/test/maker_fixtures/BF-254.json +0 -22
  119. data/test/maker_fixtures/BF-263.json +0 -32
  120. data/test/maker_fixtures/BID-017.json +0 -41
  121. data/test/maker_fixtures/BLK-049.json +0 -28
  122. data/test/maker_fixtures/BRA-002.json +0 -34
  123. data/test/maker_fixtures/BWB-005.json +0 -32
  124. data/test/maker_fixtures/CEN-033.json +0 -35
  125. data/test/maker_fixtures/CHN-008.json +0 -31
  126. data/test/maker_fixtures/CHS-015.json +0 -32
  127. data/test/maker_fixtures/CND-012.json +0 -30
  128. data/test/maker_fixtures/CND-062.json +0 -30
  129. data/test/maker_fixtures/CRAD-099.json +0 -38
  130. data/test/maker_fixtures/CRPD-451.json +0 -30
  131. data/test/maker_fixtures/CRS-056.json +0 -18
  132. data/test/maker_fixtures/CRSS-013.json +0 -39
  133. data/test/maker_fixtures/CWM-156.json +0 -34
  134. data/test/maker_fixtures/Carib 021511-620.json +0 -28
  135. data/test/maker_fixtures/Caribpr 082914_940.json +0 -31
  136. data/test/maker_fixtures/DASD-001.json +0 -30
  137. data/test/maker_fixtures/DAZD-001.json +0 -27
  138. data/test/maker_fixtures/DCOL-017.json +0 -26
  139. data/test/maker_fixtures/DGL-007.json +0 -25
  140. data/test/maker_fixtures/DGL-066.json +0 -26
  141. data/test/maker_fixtures/DOM-045.json +0 -36
  142. data/test/maker_fixtures/EBOD-109.json +0 -31
  143. data/test/maker_fixtures/ECB-078.json +0 -33
  144. data/test/maker_fixtures/EDD-189.json +0 -33
  145. data/test/maker_fixtures/ESK-232.json +0 -31
  146. data/test/maker_fixtures/EZD-369.json +0 -32
  147. data/test/maker_fixtures/FSET-399.json +0 -41
  148. data/test/maker_fixtures/FTN-002.json +0 -15
  149. data/test/maker_fixtures/GDW-006.json +0 -18
  150. data/test/maker_fixtures/HAZ-009.json +0 -33
  151. data/test/maker_fixtures/HON-001.json +0 -31
  152. data/test/maker_fixtures/IDBD-447.json +0 -31
  153. data/test/maker_fixtures/INF-003.json +0 -19
  154. data/test/maker_fixtures/INU-013.json +0 -34
  155. data/test/maker_fixtures/IPSD-041.json +0 -38
  156. data/test/maker_fixtures/IPTD-464.json +0 -34
  157. data/test/maker_fixtures/IPTD-629.json +0 -31
  158. data/test/maker_fixtures/IPZ-005.json +0 -33
  159. data/test/maker_fixtures/JBD-153.json +0 -42
  160. data/test/maker_fixtures/JBS-004.json +0 -32
  161. data/test/maker_fixtures/JOB-010.json +0 -33
  162. data/test/maker_fixtures/JUC-285.json +0 -37
  163. data/test/maker_fixtures/JUFD-137.json +0 -34
  164. data/test/maker_fixtures/JUX-007.json +0 -36
  165. data/test/maker_fixtures/JUX-119.json +0 -36
  166. data/test/maker_fixtures/KAWD-249.json +0 -31
  167. data/test/maker_fixtures/KAWD-315.json +0 -32
  168. data/test/maker_fixtures/KIRD-147.json +0 -29
  169. data/test/maker_fixtures/KISD-042.json +0 -33
  170. data/test/maker_fixtures/LLR-005.json +0 -35
  171. data/test/maker_fixtures/LNS-003.json +0 -15
  172. data/test/maker_fixtures/MAS-042.json +0 -36
  173. data/test/maker_fixtures/MBD-148.json +0 -32
  174. data/test/maker_fixtures/MDC-002.json +0 -33
  175. data/test/maker_fixtures/MDYD-544.json +0 -31
  176. data/test/maker_fixtures/MDYD-863.json +0 -29
  177. data/test/maker_fixtures/MEK-008.json +0 -32
  178. data/test/maker_fixtures/MIAD-490.json +0 -35
  179. data/test/maker_fixtures/MIDD-599.json +0 -37
  180. data/test/maker_fixtures/MIDD-643.json +0 -33
  181. data/test/maker_fixtures/MIDD-644.json +0 -31
  182. data/test/maker_fixtures/MIDE-004.json +0 -35
  183. data/test/maker_fixtures/MIGD-284.json +0 -35
  184. data/test/maker_fixtures/MIGD-336.json +0 -34
  185. data/test/maker_fixtures/MIGD-337.json +0 -36
  186. data/test/maker_fixtures/MIMK-005.json +0 -37
  187. data/test/maker_fixtures/MINT-004.json +0 -36
  188. data/test/maker_fixtures/MIQD-010.json +0 -28
  189. data/test/maker_fixtures/MIRD-071.json +0 -42
  190. data/test/maker_fixtures/MIRD-072.json +0 -48
  191. data/test/maker_fixtures/MIRD-073.json +0 -39
  192. data/test/maker_fixtures/MIXS-005.json +0 -35
  193. data/test/maker_fixtures/MMY-010.json +0 -32
  194. data/test/maker_fixtures/NAGE-001.json +0 -33
  195. data/test/maker_fixtures/NDR-001.json +0 -32
  196. data/test/maker_fixtures/NLF-001.json +0 -15
  197. data/test/maker_fixtures/NOF-003.json +0 -36
  198. data/test/maker_fixtures/NPS-130.json +0 -18
  199. data/test/maker_fixtures/NRS-012.json +0 -17
  200. data/test/maker_fixtures/OBA-045.json +0 -36
  201. data/test/maker_fixtures/ONSD-570.json +0 -29
  202. data/test/maker_fixtures/OPUD-001.json +0 -41
  203. data/test/maker_fixtures/OPUD-125.json +0 -45
  204. data/test/maker_fixtures/OSR-003.json +0 -32
  205. data/test/maker_fixtures/PARM-028.json +0 -21
  206. data/test/maker_fixtures/PBD-134.json +0 -33
  207. data/test/maker_fixtures/PGD-306.json +0 -33
  208. data/test/maker_fixtures/PJD-085.json +0 -30
  209. data/test/maker_fixtures/PLA-001.json +0 -29
  210. data/test/maker_fixtures/PPB-008.json +0 -31
  211. data/test/maker_fixtures/PPP-001.json +0 -45
  212. data/test/maker_fixtures/PPPD-102.json +0 -34
  213. data/test/maker_fixtures/PPSD-028.json +0 -41
  214. data/test/maker_fixtures/PPT-004.json +0 -31
  215. data/test/maker_fixtures/PTS-230.json +0 -17
  216. data/test/maker_fixtures/PTV-001.json +0 -29
  217. data/test/maker_fixtures/PXD-024.json +0 -31
  218. data/test/maker_fixtures/PXD-027.json +0 -37
  219. data/test/maker_fixtures/Perfect-G 430mei.json +0 -18
  220. data/test/maker_fixtures/Perfect-G 481yuuka.json +0 -18
  221. data/test/maker_fixtures/Perfect-G Docle yoriko2.json +0 -19
  222. data/test/maker_fixtures/Perfect-G kumie.json +0 -18
  223. data/test/maker_fixtures/Perfect-G le_yoriko2.json +0 -19
  224. data/test/maker_fixtures/Perfect-G yoriko2 Docle.json +0 -19
  225. data/test/maker_fixtures/RAW-005.json +0 -32
  226. data/test/maker_fixtures/RBD-183.json +0 -40
  227. data/test/maker_fixtures/RDT-190.json +0 -20
  228. data/test/maker_fixtures/RTP-005.json +0 -21
  229. data/test/maker_fixtures/RTP-025.json +0 -12
  230. data/test/maker_fixtures/S-Cute 248_hibiki_07.json +0 -26
  231. data/test/maker_fixtures/S-Cute 352_kokona_02.json +0 -26
  232. data/test/maker_fixtures/S-Cute 353_rena_01.json +0 -26
  233. data/test/maker_fixtures/S-Cute ps5_07_rimu.json +0 -26
  234. data/test/maker_fixtures/S-Cute ps6_99_reona.json +0 -26
  235. data/test/maker_fixtures/S-Cute ps7_83_akari2.json +0 -26
  236. data/test/maker_fixtures/S-Cute swm_05_risa2.json +0 -26
  237. data/test/maker_fixtures/SAD-031.json +0 -35
  238. data/test/maker_fixtures/SDDE-312.json +0 -34
  239. data/test/maker_fixtures/SDMT-802.json +0 -32
  240. data/test/maker_fixtures/SDMU-008.json +0 -38
  241. data/test/maker_fixtures/SDNM-011.json +0 -37
  242. data/test/maker_fixtures/SET-007.json +0 -33
  243. data/test/maker_fixtures/SGA-001.json +0 -32
  244. data/test/maker_fixtures/SHKD-415.json +0 -38
  245. data/test/maker_fixtures/SNIS-041.json +0 -35
  246. data/test/maker_fixtures/SOE-259.json +0 -32
  247. data/test/maker_fixtures/SOE-379.json +0 -28
  248. data/test/maker_fixtures/SPC-001.json +0 -31
  249. data/test/maker_fixtures/SPS-008.json +0 -33
  250. data/test/maker_fixtures/SRS-015.json +0 -32
  251. data/test/maker_fixtures/SSPD-077.json +0 -44
  252. data/test/maker_fixtures/STAR-359.json +0 -33
  253. data/test/maker_fixtures/SUPD-065.json +0 -40
  254. data/test/maker_fixtures/TDT-018.json +0 -31
  255. data/test/maker_fixtures/TMAM-034.json +0 -15
  256. data/test/maker_fixtures/TMCY-039.json +0 -15
  257. data/test/maker_fixtures/TMDI-040.json +0 -15
  258. data/test/maker_fixtures/TMEM-044.json +0 -15
  259. data/test/maker_fixtures/TMVI-042.json +0 -15
  260. data/test/maker_fixtures/TRD-062.json +0 -31
  261. data/test/maker_fixtures/TYOD-232.json +0 -21
  262. data/test/maker_fixtures/Tokyo 247 371yui.json +0 -35
  263. data/test/maker_fixtures/ULT-013.json +0 -15
  264. data/test/maker_fixtures/URE-011.json +0 -39
  265. data/test/maker_fixtures/VVP-001.json +0 -17
  266. data/test/maker_fixtures/WA-201.json +0 -17
  267. data/test/maker_fixtures/WAT-003.json +0 -33
  268. data/test/maker_fixtures/WDI-037.json +0 -38
  269. data/test/maker_fixtures/WPC-002.json +0 -35
  270. data/test/maker_fixtures/WSS-231.json +0 -33
  271. data/test/maker_fixtures/XND-023.json +0 -32
  272. data/test/maker_fixtures/XXX 21685.json +0 -17
  273. data/test/maker_fixtures/YRH-008.json +0 -35
  274. data/test/maker_fixtures/YRZ-009.json +0 -32
  275. data/test/maker_fixtures/YUM-001.json +0 -12
  276. data/test/maker_fixtures/ZEX-068.json +0 -18
@@ -1,26 +0,0 @@
1
- base_uri 'dip-av.jp'
2
-
3
- register_product(
4
- /^(NPS|PTS|WA|ZEX)-?(\d{3})$/i,
5
- '/detail.php?hinban=#{$1.upcase}-#{$2}',
6
- )
7
-
8
- private
9
-
10
- def self.parse_product_html(html)
11
- specs = Utils.hash_by_split(html.css('#main > div.detail > div.actor').map(&:text)).merge(
12
- Utils.hash_by_split(html.xpath('//*[@id="main"]/div[@class="detail"]/div[not(@class)]').text.lines))
13
- {
14
- actresses: specs['出演者'].split,
15
- cover_image: html.at_css('#main > div.detail > a')['href'],
16
- description: html.css('#main > div.detail > div.comment').text,
17
- genres: specs['ジャンル'].split,
18
- label: specs['レーベル'],
19
- maker: specs['メーカー'],
20
- movie_length: specs['収録時間'],
21
- release_date: specs['発売日'],
22
- series: specs['シリーズ'],
23
- thumbnail_image: html.at_css('#main > div.detail > a > img')['src'],
24
- title: html.css('#main > h1').text,
25
- }
26
- end
@@ -1,23 +0,0 @@
1
- base_uri 'dmm-collection.com'
2
-
3
- register_product(
4
- /^(DCOL|DGL)-?(\d{3})$/i,
5
- '/works/-/detail/=/cid=#{$1.downcase}#{$2}',
6
- )
7
-
8
- private
9
-
10
- def self.parse_product_html(html)
11
- specs = Utils.hash_from_dl(html.xpath('//*[@id="information"]/dl[2]'))
12
- {
13
- actresses: html.css('#information > dl.actress > dd').text.split,
14
- cover_image: html.at_xpath('//*[@id="package"]/h4/a')['href'],
15
- description: html.xpath('//*[@id="comment"]/h5').text,
16
- maker: 'D★Collection',
17
- movie_length: specs['収録時間'].text,
18
- release_date: specs['DVD発売日'].text,
19
- sample_images: html.xpath('//*[@id="photo"]/ul/li/a').map { |a| a['href'] },
20
- thumbnail_image: html.at_xpath('//*[@id="package"]/h4/a/img')['src'],
21
- title: html.xpath('//*[@id="information"]/h3').text,
22
- }
23
- end
@@ -1,56 +0,0 @@
1
- base_uri 'd-o-c.biz'
2
-
3
- register_product(
4
- /^(CRS|FTN|GDW|INF|LNS|NLF|NRS|RDT|RTP|ULT|VVP|YUM)-?(\d{3})$/i,
5
- '/catalog/#{$1.downcase}-#{$2}.html',
6
- )
7
-
8
- private
9
-
10
- def self.parse_product_html(html)
11
- specs = parse_specs(html)
12
- {
13
- actresses: parse_actresses(specs['女優']),
14
- # brand: String
15
- # categories: Array
16
- # code: String
17
- cover_image: html.at_css('#single_box > div.entry-content > img')['src'],
18
- description: specs['商品説明'],
19
- # directors: Array
20
- genres: specs['ジャンル'].split('・'),
21
- label: specs['レーベル'],
22
- maker: 'DOC',
23
- movie_length: specs['収録'],
24
- # page: String
25
- release_date: specs['発売日'],
26
- # sample_images: Array
27
- # scenes: Array
28
- series: specs['シリーズ'],
29
- # subtitle: String
30
- # theme: String
31
- thumbnail_image: html.at_css('#single_box > div.entry-content > img')['src'],
32
- title: html.css('#single_box > h1').text,
33
- }
34
- end
35
-
36
- def self.parse_actresses(str)
37
- names = []
38
- str.split.each do |piece|
39
- if piece.length <=3 && names.present? && names[-1].length <= 3
40
- names[-1] += piece
41
- else
42
- names << piece
43
- end
44
- end
45
- names
46
- end
47
-
48
- def self.parse_specs(html)
49
- root = html.css('#single_box > div.entry-content > div')
50
- groups = root.children.to_a.split do |delimeter|
51
- delimeter.name == 'br'
52
- end.map do |group|
53
- group.map(&:text).join
54
- end
55
- Utils.hash_by_split(groups)
56
- end
@@ -1,26 +0,0 @@
1
- base_uri 'www.av-e-body.com'
2
-
3
- register_product(
4
- /^(EBOD)-?(\d{3})$/i,
5
- '/works/#{$1.downcase}/#{$1.downcase}#{$2}.html',
6
- )
7
-
8
- private
9
-
10
- def self.parse_product_html(html)
11
- specs = Utils.hash_from_dl(html.css('div.title-data > dl')).merge(
12
- Utils.hash_by_split(html.xpath('//*[@id="content"]/div/div[3]/div[1]/p').text.lines))
13
- {
14
- actresses: specs['出演女優'].css('a').map(&:text),
15
- cover_image: html.at_css('div.package > a.package-pic')["href"],
16
- description: html.css('div.title-data > p.comment').text,
17
- genres: specs['ジャンル'].css('a').map(&:text),
18
- maker: 'E-Body',
19
- movie_length: specs['収録時間'],
20
- release_date: specs['発売日'].text,
21
- sample_images: html.css('div.sample-box > ul.sample-pic > li > a').map { |a| a["href"] },
22
- thumbnail_image: html.at_css('#content > div > div.left-box > div.package > a > img')['src'],
23
- series: specs['シリーズ'].text.remove(':'),
24
- title: html.css('div.title-data > h1').text,
25
- }
26
- end
@@ -1,59 +0,0 @@
1
- base_uri 'www.g-area.org'
2
-
3
- register_product(
4
- /^Perfect[-_\s]G\s+?le_(\w+)$/i,
5
- '/sample_le/le_#{$1.downcase}/spalc_gallery.php',
6
- 'Perfect-G #{$1.downcase} Dolce'
7
- )
8
-
9
- register_product(
10
- /^Perfect[-_\s]G\s+Docle\s+(\w+)$/i,
11
- '/sample_le/le_#{$1.downcase}/spalc_gallery.php',
12
- 'Perfect-G #{$1.downcase} Dolce'
13
- )
14
-
15
- register_product(
16
- /^Perfect[-_\s]G\s+(\w+)\s+Docle$/i,
17
- '/sample_le/le_#{$1.downcase}/spalc_gallery.php',
18
- 'Perfect-G #{$1.downcase} Dolce'
19
- )
20
-
21
- register_product(
22
- /^Perfect[-_\s]G\s+(?!le_)(\w+)$/i,
23
- '/sample_pg/#{$1.downcase}/spgallery.php',
24
- 'Perfect-G #{$1.downcase}'
25
- )
26
-
27
- private
28
-
29
- def self.parse_product_html(html)
30
- {
31
- actresses: [ html.css('div.co_ww > div.prof_dat > div.p_name').text[/(?<=-).*(?=-)/] ],
32
- # brand: String
33
- # categories: Array
34
- cover_image: html.at_css('div.co_ww > div.prof_img > div.pro_imb > div.prof_big > div > img')['src'],
35
- description: html.css('div.co_ww > div.prof_img > div.prof_cap').text,
36
- # directors: Array
37
- # genres: Array
38
- # label: String
39
- maker: 'Perfect-G',
40
- movie_length: html.css('div.co_ww > div.prof_dat > div.p_mov').text,
41
- # release_date: String
42
- sample_images: html.css('div.co_ww > div.prof_img > div.pro_imb div.sml_img_w > div.sml_img > img').map { |img| img['src'] },
43
- # scenes: Array
44
- # series: String
45
- # subtitle: String
46
- # theme: String
47
- thumbnail_image: html.at_css('div.co_ww > div.prof_img > div.pro_imb > div.prof_big > div > img')['src'],
48
- title: html.css('div.co_ww > div.prof_dat > div.p_name').text[/(?<=-).*(?=-)/],
49
- }
50
- end
51
-
52
- def self.product_extra_info(name, url, page, html)
53
- code = product_code(name)
54
- code = code[/(?<=Perfect-G ).*/]
55
- extra_info = Hash.new
56
- extra_info[:thumbnail_image] = "http://www.g-area.com/img/main/#{code}_320_180.jpg"
57
- extra_info[:cover_image] = extra_info[:thumbnail_image]
58
- extra_info
59
- end
@@ -1,28 +0,0 @@
1
- base_uri 'www.ideapocket.com'
2
-
3
- register_product(
4
- /^(IDBD|IPSD|IPTD|IPZ|SUPD)-?(\d{3})$/i,
5
- '/works/-/detail/=/cid=#{$1.downcase}#{$2}',
6
- )
7
-
8
- private
9
-
10
- def self.parse_product_html(html)
11
- specs = Utils.hash_from_dl(html.xpath('//*[@id="contents-inline"]/dl'))
12
- {
13
- actresses: specs['女優'].css('span,a').map(&:text),
14
- cover_image: html.xpath('//*[@id="slide-photo"]/div/img').first['src'],
15
- directors: specs['監督'].css('span,a').map(&:text),
16
- description: html.xpath('//*[@id="contents-inline"]/p').text,
17
- genres: specs['ジャンル'].css('span,a').map(&:text),
18
- label: specs['レーベル'].text,
19
- maker: 'Ideapocket',
20
- movie_length: nil,
21
- release_date: specs['発売日'].text,
22
- sample_images: html.xpath('//*[@id="slide-photo"]/div/img')[1..-1].map { |img| img['src'] },
23
- thumbnail_image: html.xpath('//*[@id="slide-photo"]/div/img').first['src'],
24
- series: specs['シリーズ'].text,
25
- title: html.xpath('//*[@id="contents-inline"]/h1').text,
26
- }
27
- end
28
-
@@ -1,25 +0,0 @@
1
- base_uri 'www.kawaiikawaii.jp'
2
-
3
- register_product(
4
- /^(KAWD)-?(\d{3})$/i,
5
- '/works/-/detail/=/cid=#{$1.downcase}#{$2}',
6
- )
7
-
8
- private
9
-
10
- def self.parse_product_html(html)
11
- specs = Utils.hash_from_dl(html.css('#content > div.col540 > div > div.dvd_info > dl'))
12
- {
13
- actresses: specs['出演者'].text.split('/'),
14
- cover_image: html.at_css('#content > div.col300 > span.pake > p.textright > a > img')['src'].gsub(/pm.jpg$/, 'pl.jpg'),
15
- description: html.css('#content > div.col540 > div > p.text').text,
16
- genres: specs['ジャンル'].text.split('/'),
17
- maker: 'Kawaii',
18
- movie_length: (specs['DVD収録時間'] || specs['Blu-ray収録時間']).text,
19
- release_date: (specs['DVD発売日'] || specs['Blu-ray発売日']).text,
20
- sample_images: html.css('#work_image_unit > a > img').map { |img| img['src'].gsub(/js(?=-\d+\.jpg$)/, 'jp') },
21
- series: specs['シリーズ'].text,
22
- title: html.css('#content > div.col540 > div > h3.worktitle').text,
23
- thumbnail_image: html.at_css('#content > div.col300 > span.pake > p.textright > a > img')['src'],
24
- }
25
- end
@@ -1,25 +0,0 @@
1
- base_uri 'www.kirakira-av.com'
2
-
3
- register_product(
4
- /^(BLK|KIRD|KISD|SET)-?(\d{3})$/i,
5
- '/works/-/detail/=/cid=#{$1.downcase}#{$2}',
6
- )
7
-
8
- private
9
-
10
- def self.parse_product_html(html)
11
- specs = Utils.hash_from_dl(html.xpath('//*[@id="wrap-works"]/section/section[2]/dl'))
12
- {
13
- actresses: specs['出演女優'].css('ul > li').map(&:text),
14
- cover_image: html.at_css('#slider > ul.slides > li:nth-child(1) > img')['src'],
15
- description: html.xpath('//*[@id="wrap-works"]/section/section[1]/p').text,
16
- genres: specs['ジャンル'].css('ul > li').map(&:text),
17
- label: specs['レーベル'].text,
18
- maker: 'Kira☆Kira',
19
- movie_length: specs['収録時間'].text,
20
- release_date: specs['発売日'].text,
21
- sample_images: html.css('#slider > ul.slides > li > img').map { |img| img['src'] }[1..-1],
22
- thumbnail_image: html.at_css('#carousel > ul.slides > li:nth-child(1) > img')['src'],
23
- title: html.css('#wrap-works > section > h1').text,
24
- }
25
- end
@@ -1,25 +0,0 @@
1
- base_uri 'www.madonna-av.com'
2
-
3
- register_product(
4
- /^(JUC|JUFD|JUX|OBA|URE)-?(\d{3})$/i,
5
- '/works/-/detail/=/cid=#{$1.downcase}#{$2}',
6
- )
7
-
8
- private
9
-
10
- def self.parse_product_html(html)
11
- specs = Utils.hash_from_dl(html.css('#wrap-contents > div.wrap-detail-links > dl'))
12
- {
13
- actresses: specs['出演女優'].css('a').map(&:text),
14
- cover_image: html.at_css('#wrap-contents > div.wrap-detail-main > div.pack > a')['href'],
15
- description: html.css('#wrap-contents > div.wrap-detail-main > p').text,
16
- directors: specs['監督'].text.split,
17
- genres: specs['ジャンル'].text.split,
18
- maker: 'Madonna',
19
- movie_length: specs['収録時間'].text.remove('DVD'),
20
- release_date: specs['発売日'].text.remove('DVD'),
21
- sample_images: html.css('#wrap-contents > div.wrap-detail-main > div.photo > ul > li > a').map { |a| a['href'] },
22
- thumbnail_image: html.at_css('#wrap-contents > div.wrap-detail-main > div.pack > a > img')['src'],
23
- title: html.css('#wrap-contents > h1').text,
24
- }
25
- end
@@ -1,45 +0,0 @@
1
- base_uri 'www.moodyz.com'
2
-
3
- def self.product_url(name)
4
- case name
5
- when /^(MIAD|MIDD|MIDE|MIGD|MIMK|MINT|MIQD|MIRD|MIXS)-?(\d{3})$/i
6
- alpha = $1.downcase
7
- alpha.remove!(/d$/) if ( (alpha == 'midd' && $2.to_i <= 643) ||
8
- (alpha == 'migd' && $2.to_i <= 336) ||
9
- (alpha == 'mird' && $2.to_i <= 72) )
10
- "/shop/-/detail/=/cid=#{alpha}#{$2}"
11
- else
12
- nil
13
- end
14
- end
15
-
16
- def self.product_code(name)
17
- case name
18
- when /^(MIAD|MIDD|MIDE|MIGD|MIMK|MINT|MIQD|MIRD|MIXS)-?(\d{3})$/i
19
- "#{$1.upcase}-#{$2}"
20
- else
21
- nil
22
- end
23
- end
24
-
25
- private
26
-
27
- def self.parse_product_html(html)
28
- specs = Utils.hash_by_split(html.xpath('//*[@id="nabi_information"]/ul/li[1]/dl/dd').map(&:text)).merge(
29
- Utils.hash_by_split(html.xpath('//*[@id="nabi_information"]/ul/li').map(&:text)[1..-1]))
30
- {
31
- actresses: html.xpath('//*[@id="works"]/dl/dt').map(&:text),
32
- cover_image: html.at_xpath('//*[@id="works"]/span/a/p/img')['src'].gsub(/pm.jpg$/, 'pl.jpg'),
33
- description: html.xpath('//*[@id="works"]/dl/dd').text,
34
- directors: specs['▪監督'].split,
35
- genres: specs['▪ジャンル'].split('/'),
36
- label: specs['▪レーベル'],
37
- maker: 'Moodyz',
38
- movie_length: specs['収録時間'],
39
- release_date: specs['発売日'],
40
- sample_images: html.xpath('//*[@id="sample-pic"]/li/a/img').map { |img| img['src'].gsub(/js(?=-\d+\.jpg$)/, 'jp') },
41
- series: specs['▪シリーズ'],
42
- thumbnail_image: html.at_xpath('//*[@id="works"]/span/a/p/img')['src'],
43
- title: html.xpath('//*[@id="main"]/ul[2]/h3/dl/dd/h2').text,
44
- }
45
- end
@@ -1,25 +0,0 @@
1
- base_uri 'www.munekyunkissa.com'
2
-
3
- register_product(
4
- /^(ALB)-?(\d{3})$/i,
5
- '/works/#{$1.downcase}/#{$1.downcase}#{$2}.html',
6
- )
7
-
8
- private
9
-
10
- def self.parse_product_html(html)
11
- specs = Utils.hash_from_dl(html.at_css('dl.data-left')).merge(
12
- Utils.hash_from_dl(html.at_css('dl.data-right')))
13
- {
14
- actresses: specs['出演者'].text.remove(':').split('/'),
15
- cover_image: html.at_css('div.ttl-pac a.ttl-package')['href'],
16
- description: html.css('div.ttl-comment div.comment').text,
17
- maker: '胸キュン喫茶',
18
- movie_length: specs['収録時間'].text.remove(':'),
19
- release_date: specs['発売日'].text.remove(':'),
20
- sample_images: html.css('div.ttl-sample img').map { |img| img['src'] },
21
- thumbnail_image: html.at_css('#main > div > div.main-detail > div.ttl-pac > a > img')['src'],
22
- title: html.css('div.capt01').text,
23
- # TODO: parse series, label, genres from pics
24
- }
25
- end
@@ -1,44 +0,0 @@
1
- base_uri 'www.1pondo.tv'
2
-
3
- register_product(
4
- /^1pondo ?(\d{6})[-_](\d{3})$/i,
5
- '/moviepages/#{$1}_#{$2}/index.html',
6
- '1pondo #{$1}_#{$2}',
7
- )
8
-
9
- private
10
-
11
- def self.parse_product_html(html)
12
- {
13
- actresses: html.css('#profile-area > div > ul.bgoose > li > a > h2').map(&:text),
14
- # brand: String
15
- # categories: Array
16
- # cover_image: String
17
- description: html.css('#profile-area > div.rr2').inner_text,
18
- # directors: Array
19
- # genres: Array
20
- # label: String
21
- maker: '一本道',
22
- # movie_length: String
23
- # release_date: String
24
- sample_images: html.css('#movie-main > div.pics > table > tr > td > img').map { |img| img['src'] },
25
- # scenes: Array
26
- # series: String
27
- # subtitle: String
28
- # theme: String
29
- thumbnail_image: './images/thum_b.jpg',
30
- title: parse_title(html.css('head > title').text),
31
- }
32
- end
33
-
34
- def self.parse_title(str)
35
- str =~ /「(.*)」/ ? $1 : str
36
- end
37
-
38
- def self.product_extra_info(name, url, page, html)
39
- cover_image = URI.join(page.request.last_uri, "./images/str.jpg").to_s
40
- cover_image = URI.join(page.request.last_uri, "./images/popu.jpg").to_s if get_with_retry(cover_image).code != 200
41
- {
42
- cover_image: cover_image
43
- }
44
- end
@@ -1,29 +0,0 @@
1
- base_uri 'www.av-opera.jp'
2
-
3
- register_product(
4
- /^(OPUD)-?(\d{3})$/i,
5
- '/works/-/detail/=/cid=#{$1.downcase}#{$2}',
6
- )
7
-
8
- private
9
-
10
- def self.parse_product_html(html)
11
- specs = Utils.hash_from_dl(html.css('#container-detail > div.pkg-data > div.data > dl.left-data')).merge(
12
- Utils.hash_from_dl(html.css('#container-detail > div.pkg-data > div.data > dl.right-data')))
13
- {
14
- actresses: specs['出演女優'].css('a').map(&:text),
15
- cover_image: html.at_css('div#container-detail > div.pkg-data > div.pkg > a > img')['src'].gsub(/pm.jpg$/, 'pl.jpg'),
16
- description: html.css('#container-detail > div.pkg-data > div.comment-data').text,
17
- directors: specs['監督'].css('a').map(&:text),
18
- genres: specs['ジャンル'].css('a').map(&:text),
19
- maker: 'Opera',
20
- movie_length: specs['収録時間'].text,
21
- release_date: specs['発売日'].text,
22
- sample_images: html.css('#sample-pic > li > a > img').map { |img| img['src'].gsub(/js(?=-\d+\.jpg$)/, "jl") },
23
- scatologies: specs['スカトロ'].css('a').map(&:text),
24
- series: specs['シリーズ'].text.remove(':'),
25
- thumbnail_image: html.at_css('div#container-detail > div.pkg-data > div.pkg > a > img')['src'],
26
- title: html.xpath('//*[@id="container-detail"]/p[1]').text,
27
- transsexualities: specs['ニューハーフ'].css('a').map(&:text),
28
- }
29
- end