opendmm 0.3.22 → 0.3.23

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ae3c8fc39727cb62c8865836452764b1d5929fef
4
- data.tar.gz: 7b4b8d74d91ac5d21aa065048b504e012516a451
3
+ metadata.gz: 4e6f5103146dda97e189d1f237a8f2d4652530e9
4
+ data.tar.gz: 4cc4871afb5f9a8d418ca75ef4bc18e330ac9c14
5
5
  SHA512:
6
- metadata.gz: 36bcd2782091d028a7a655cb0558137ff2032ea62bd3213451787d9fe6ac410c59042f096f64a07ca88b1bf2ac28f86439ff8d527503ee513e972cb55b9579ef
7
- data.tar.gz: 9d0d9c41dfc02823af86715921f462e2f08b51e1c344e1d59f430fa9ce329561dce23ebff115b151f5b9602bf9abe56b48b92418942d30168c26111133eb7476
6
+ metadata.gz: 67a6d941920facfc9ede225091a69005639e5df9caa7d18e87c05a68422f47db946005f73b35903c6f3e23c2a1453bd14819bb4c65a21d2004e1c92e593b28c7
7
+ data.tar.gz: 3a087eec2b3682299e25a869be0f14aebacab2e43f7ea3754f29860769dc81d3f00010505d273973516eb8b3c37ce0a99646beb4217f7b2915e0c55e56ed2b6f
@@ -18,9 +18,9 @@ private
18
18
  def self.parse_product_html(html)
19
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
20
  {
21
- actresses: specs['出演者'].try(:split, '・'),
21
+ actresses: specs['出演者'].split('・'),
22
22
  cover_image: parse_cover_image(html),
23
- directors: specs['監督'].try(:split, '・'),
23
+ directors: specs['監督'].split('・'),
24
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
25
  genres: specs['ジャンル'].split,
26
26
  label: specs['レーベル'],
@@ -11,10 +11,10 @@ def self.parse_product_html(html)
11
11
  specs = Utils.hash_by_split(html.css('#main > div.detail > div.actor').map(&:text)).merge(
12
12
  Utils.hash_by_split(html.xpath('//*[@id="main"]/div[@class="detail"]/div[not(@class)]').text.lines))
13
13
  {
14
- actresses: specs['出演者'].try(:split),
14
+ actresses: specs['出演者'].split,
15
15
  cover_image: html.at_css('#main > div.detail > a')['href'],
16
16
  description: html.css('#main > div.detail > div.comment').text,
17
- genres: specs['ジャンル'].try(:split),
17
+ genres: specs['ジャンル'].split,
18
18
  label: specs['レーベル'],
19
19
  maker: specs['メーカー'],
20
20
  movie_length: specs['収録時間'],
@@ -31,7 +31,7 @@ def self.parse_product_html(html)
31
31
  actresses: [ html.css('div.co_ww > div.prof_dat > div.p_name').text[/(?<=-).*(?=-)/] ],
32
32
  # brand: String
33
33
  # categories: Array
34
- cover_image: html.at_css('div.co_ww > div.prof_img > div.pro_imb > div.prof_big > div > img').try(:[], 'src'),
34
+ cover_image: html.at_css('div.co_ww > div.prof_img > div.pro_imb > div.prof_big > div > img')['src'],
35
35
  description: html.css('div.co_ww > div.prof_img > div.prof_cap').text,
36
36
  # directors: Array
37
37
  # genres: Array
@@ -44,7 +44,7 @@ def self.parse_product_html(html)
44
44
  # series: String
45
45
  # subtitle: String
46
46
  # theme: String
47
- thumbnail_image: html.at_css('div.co_ww > div.prof_img > div.pro_imb > div.prof_big > div > img').try(:[], 'src'),
47
+ thumbnail_image: html.at_css('div.co_ww > div.prof_img > div.pro_imb > div.prof_big > div > img')['src'],
48
48
  title: html.css('div.co_ww > div.prof_dat > div.p_name').text[/(?<=-).*(?=-)/],
49
49
  }
50
50
  end
@@ -10,10 +10,10 @@ private
10
10
  def self.parse_product_html(html)
11
11
  specs = Utils.hash_from_dl(html.css('div.wrap-maincontents > section.wrap-information > div.wrap-detail > div.wrap-detail-text > dl.wrap-detail-item'))
12
12
  {
13
- actresses: specs['出演女優'].text.try(:split, '/'),
13
+ actresses: specs['出演女優'].text.split('/'),
14
14
  cover_image: html.css('#wrap-detail-slider > ul.bx-detail-slider > li > img').first['src'],
15
15
  description: html.css('div.wrap-maincontents > section.wrap-information > div.wrap-detail > div.wrap-detail-text > div.wrap-detail-description').text,
16
- genres: specs['ジャンル'].text.try(:split),
16
+ genres: specs['ジャンル'].text.split,
17
17
  maker: '溜池ゴロー',
18
18
  release_date: specs['発売日'].text,
19
19
  series: specs['シリーズ'].text,
@@ -13,7 +13,7 @@ def self.parse_product_html(html)
13
13
  {
14
14
  actresses: specs['名前'].split,
15
15
  # brand: String
16
- categories: specs['カテゴリー'].try(:split),
16
+ categories: specs['カテゴリー'].split,
17
17
  cover_image: './images/str.jpg',
18
18
  # description: String
19
19
  # directors: Array
@@ -0,0 +1,43 @@
1
+ base_uri 'www.xxx-av.com'
2
+
3
+ register_product(
4
+ /^XXX ?(\d{4,5})$/i,
5
+ '/mov/view/#{$1}.html',
6
+ 'XXX #{$1}',
7
+ )
8
+
9
+ private
10
+
11
+ def self.parse_product_html(html)
12
+ specs = Utils.hash_from_dl(html.css('#movie > div.movie_bg > div > div.detail > dl'))
13
+ {
14
+ actresses: html.css('#site_contents > div.right_contents > div.main > div.movie_data > dl > dt').text.split,
15
+ # brand: String
16
+ categories: specs['カテゴリ:'].text.split,
17
+ # cover_image: String
18
+ description: html.css('#site_contents > div.right_contents > div.main > div.movie_data > dl > dd').text,
19
+ # directors: Array
20
+ genres: specs['ジャンル:'].text.split,
21
+ keywords: specs['キーワード:'].text.split,
22
+ # label: String
23
+ maker: 'XXX',
24
+ movie_length: specs['再生時間:'].text,
25
+ release_date: specs['公開日:'].text,
26
+ # sample_images: Array
27
+ # scenes: Array
28
+ # series: String
29
+ # subtitle: String
30
+ # theme: String
31
+ # thumbnail_image: String
32
+ title: html.css('#movie > div.movie_tt > h2').text,
33
+ }
34
+ end
35
+
36
+ def self.product_extra_info(name, url, page, html)
37
+ code = product_code(name)
38
+ code = code[/(?<=XXX ).*/]
39
+ extra_info = Hash.new
40
+ extra_info[:cover_image] = "http://image.xxx-av.com/image/#{code}/movie_main.jpg"
41
+ extra_info[:thumbnail_image] = "http://image.xxx-av.com/image/#{code}/m_act.jpg"
42
+ extra_info
43
+ end
@@ -34,17 +34,17 @@ private
34
34
  def self.parse_product_html(html)
35
35
  specs = Utils.hash_by_split(html.css('//div[@class="page-detail"]/table/tr/td[1]/table/tr').map(&:text))
36
36
  {
37
- actresses: (specs['出演者'] || specs['名前']).try(:split, /[\s\/]/),
38
- cover_image: (html.at_css('#sample-video > a').try(:[], 'href') ||
39
- html.at_css('#sample-video > img').try(:[], 'src')),
40
- directors: specs['監督'].try(:split),
41
- genres: specs['ジャンル'].try(:split),
37
+ actresses: ( specs['出演者'] || specs['名前'] ).split(/[\s\/]/),
38
+ cover_image: ( html.at_css('#sample-video > a')['href'] ||
39
+ html.at_css('#sample-video > img')['src'] ),
40
+ directors: specs['監督'].split,
41
+ genres: specs['ジャンル'].split,
42
42
  label: specs['レーベル'],
43
43
  maker: specs['メーカー'],
44
44
  movie_length: specs['収録時間'],
45
45
  release_date: (specs['商品発売日'] || specs['配信開始日']),
46
46
  series: specs['シリーズ'],
47
- thumbnail_image: html.at_css('#sample-video img').try(:[], 'src'),
47
+ thumbnail_image: html.at_css('#sample-video img')['src'],
48
48
  title: html.css('#title').text,
49
49
  }
50
50
  end
data/lib/opendmm/utils.rb CHANGED
@@ -38,8 +38,8 @@ class << ChronicDuration
38
38
  end
39
39
 
40
40
  class NilClass
41
- def text
42
- ''
41
+ def method_missing(meth, *args, &block)
42
+ nil
43
43
  end
44
44
  end
45
45
 
@@ -1,3 +1,3 @@
1
1
  module OpenDMM
2
- VERSION = '0.3.22'
2
+ VERSION = '0.3.23'
3
3
  end
@@ -21,8 +21,7 @@
21
21
  "巨大電マ責め",
22
22
  "ブルーレイ・ディスク",
23
23
  "★週間ランク1位獲得作品",
24
- "★2週連続第1位獲得作品",
25
- "ムゲンエンターテインメント キラリ (3D/2D BLU-RAY) $25.00"
24
+ "★2週連続第1位獲得作品"
26
25
  ],
27
26
  "code": "MKBD-S40",
28
27
  "cover_image": "http://imgs.aventertainments.com/new/bigcover/DVD1MKBD-S40.jpg",
@@ -38,8 +38,7 @@
38
38
  "巨大電マ責め",
39
39
  "男のアナルを舐める",
40
40
  "ボンテージ",
41
- "ブルーレイ・ディスク",
42
- "スカイハイエンターテインメント (BD) $23.50"
41
+ "ブルーレイ・ディスク"
43
42
  ],
44
43
  "code": "SKYHD-108",
45
44
  "cover_image": "http://imgs.aventertainments.com/new/bigcover/DVD1SKYHD-108.jpg",
@@ -18,8 +18,7 @@
18
18
  "お姉さま",
19
19
  "美女・美人",
20
20
  "スタイル抜群モデル級",
21
- "シックスナイン",
22
- "スカイハイエンターテインメント (DVD) $13.50"
21
+ "シックスナイン"
23
22
  ],
24
23
  "code": "SKY-107",
25
24
  "cover_image": "http://imgs.aventertainments.com/bigcover/DVD1SKY-107.jpg",
data/test/fixture_test.rb CHANGED
@@ -33,6 +33,7 @@ class FixtureTest < Minitest::Test
33
33
  description: String,
34
34
  directors: Array,
35
35
  genres: Array,
36
+ keywords: Array,
36
37
  label: String,
37
38
  maker: String,
38
39
  movie_length: Fixnum,
@@ -6,7 +6,6 @@
6
6
  "cover_image": "http://s1s1s1.com/images/works/onsd570/onsd570pl.jpg",
7
7
  "description": "今年発売された新作の中から高セールスを記録した人気作を厳選!30タイトルの濃密セックスをハイビジョン級の高画質で8時間たっぷりお届けします!瑠川リナ、吉沢明歩を初めとしたS級女優が、ハードセックス!痴女FUCK!レイプなど様々なシチュエーションでイキまくる!今年をコレで締めくくれ!是非ご堪能ください!",
8
8
  "genres": [
9
- "S1 GIRLS COLLECTION",
10
9
  "Blu-ray作品"
11
10
  ],
12
11
  "maker": "S1",
@@ -0,0 +1,17 @@
1
+ {
2
+ "actresses": [
3
+ "コメント"
4
+ ],
5
+ "categories": [
6
+ "素人"
7
+ ],
8
+ "code": "XXX 21685",
9
+ "cover_image": "http://image.xxx-av.com/image/21685/movie_main.jpg",
10
+ "description": "渋谷の夜街を一人でフラフラしていた現役専門学生のしおりちゃんに声を掛けてみました!友達から連絡が無く暇を持て余していたらしく、お小遣い欲しさと暇潰しにすんなりOK!この普通っぽい感じが堪らない!色白にプリプリのお肌。服の上から解る胸の大きさ♪素材的には最高です!一年半程彼氏が居なく久しぶりのラブホにちょっと緊張気味^^しかし脱ぎっぷりはいい!しかも何ですか!!玄人バリの手コキとフェラチオテクニック!ぺろぺろちゅぱちゅぱ♪素晴らしい^^うわ!お手入れされたマンコ!ほぼパイパン!チョビ毛がエロい!今時の学生はこんなにスケベなんですか!?いやーいい経験出来ました^^",
11
+ "maker": "XXX",
12
+ "movie_length": 3055,
13
+ "page": "http://www.xxx-av.com/mov/view/21685.html",
14
+ "release_date": "2014-08-30",
15
+ "thumbnail_image": "http://image.xxx-av.com/image/21685/m_act.jpg",
16
+ "title": "初裏初撮!Dカップ現役専門学生夜遊び事情! しおり"
17
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opendmm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.22
4
+ version: 0.3.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jun Zhou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-02 00:00:00.000000000 Z
11
+ date: 2014-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -162,6 +162,7 @@ files:
162
162
  - lib/opendmm/makers/ten_musume.rb
163
163
  - lib/opendmm/makers/tokyo_247.rb
164
164
  - lib/opendmm/makers/waap.rb
165
+ - lib/opendmm/makers/xxx.rb
165
166
  - lib/opendmm/makers_broken/high_scene.rb
166
167
  - lib/opendmm/makers_broken/ideapocket.rb
167
168
  - lib/opendmm/makers_broken/premium.rb
@@ -357,6 +358,7 @@ files:
357
358
  - test/maker_fixtures/WPC-002.json
358
359
  - test/maker_fixtures/WSS-231.json
359
360
  - test/maker_fixtures/XND-023.json
361
+ - test/maker_fixtures/XXX 21685.json
360
362
  - test/maker_fixtures/YRH-008.json
361
363
  - test/maker_fixtures/YRZ-009.json
362
364
  - test/maker_fixtures/YUM-001.json
@@ -585,6 +587,7 @@ test_files:
585
587
  - test/maker_fixtures/WPC-002.json
586
588
  - test/maker_fixtures/WSS-231.json
587
589
  - test/maker_fixtures/XND-023.json
590
+ - test/maker_fixtures/XXX 21685.json
588
591
  - test/maker_fixtures/YRH-008.json
589
592
  - test/maker_fixtures/YRZ-009.json
590
593
  - test/maker_fixtures/YUM-001.json