ero_getter 1.6.3 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.6.3
1
+ 1.7.0
data/ero_getter.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "ero_getter"
8
- s.version = "1.6.3"
8
+ s.version = "1.7.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["masarakki"]
12
- s.date = "2013-03-13"
12
+ s.date = "2013-06-21"
13
13
  s.description = "ero getter"
14
14
  s.email = "masaki@hisme.net"
15
15
  s.extra_rdoc_files = [
@@ -1,19 +1,11 @@
1
1
  # -*- coding: utf-8 -*-
2
- class ElogBakufu < EroGetter::Base
2
+ class ElogBakufu < EroGetter::Livedoor #EroGetter::Base
3
3
 
4
4
  name 'エログ幕府'
5
- url %r{http://blog.livedoor.jp/samplems-bakufu/archives/\d+.html}
6
-
7
- target ".article-body-inner img" do |path|
8
- if path.parent.name == "a" && path.parent[:href] =~ /jpe?g|gif|png$/
9
- path.parent[:href]
10
- else
11
- path[:src]
12
- end
13
- end
5
+ url %r{http://bakufu.jp/archives/\d+}
14
6
 
15
7
  sub_directory do
16
- url.match(/(\d+).html/)[1]
8
+ url.match(/(\d+)/)[1]
17
9
  end
18
10
 
19
11
  filename { |attr| "%04d%s" % [attr[:index], attr[:ext]] }
@@ -45,7 +45,7 @@ class EroGetter::Base
45
45
  end
46
46
 
47
47
  def title
48
- @title ||= document.title
48
+ @title ||= document.title.strip
49
49
  end
50
50
 
51
51
  def run
@@ -2,7 +2,7 @@
2
2
  require 'spec_helper'
3
3
 
4
4
  describe ElogBakufu do
5
- let(:url) { 'http://blog.livedoor.jp/samplems-bakufu/archives/51351906.html' }
5
+ let(:url) { 'http://bakufu.jp/archives/8124' }
6
6
  subject { @dl }
7
7
 
8
8
  before do
@@ -11,8 +11,8 @@ describe ElogBakufu do
11
11
  fake(:get, url, 'elog_bakufu/sample.html')
12
12
  end
13
13
  its(:name) { should == 'エログ幕府' }
14
- its(:title) { should == '制服女子がM字開脚してるエロ画像 part2 - お宝エログ幕府' }
14
+ its(:title) { should == 'いいともより木下優樹菜の子持ち生乳チラ | お宝エログ幕府' }
15
15
  its(:base_dir) { should == 'elog_bakufu' }
16
- its(:sub_directory) { should == '51351906' }
17
- its("targets.count") { should == 40 }
16
+ its(:sub_directory) { should == '8124' }
17
+ its("targets.count") { should == 31 }
18
18
  end