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 +1 -1
- data/ero_getter.gemspec +2 -2
- data/lib/downloader/elog_bakufu.rb +3 -11
- data/lib/ero_getter/base.rb +1 -1
- data/spec/downloader/elog_bakufu_spec.rb +4 -4
- data/spec/samples/elog_bakufu/sample.html +1531 -2832
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
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.
|
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-
|
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://
|
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+)
|
8
|
+
url.match(/(\d+)/)[1]
|
17
9
|
end
|
18
10
|
|
19
11
|
filename { |attr| "%04d%s" % [attr[:index], attr[:ext]] }
|
data/lib/ero_getter/base.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
require 'spec_helper'
|
3
3
|
|
4
4
|
describe ElogBakufu do
|
5
|
-
let(:url) { 'http://
|
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 == '
|
14
|
+
its(:title) { should == 'いいともより木下優樹菜の子持ち生乳チラ | お宝エログ幕府' }
|
15
15
|
its(:base_dir) { should == 'elog_bakufu' }
|
16
|
-
its(:sub_directory) { should == '
|
17
|
-
its("targets.count") { should ==
|
16
|
+
its(:sub_directory) { should == '8124' }
|
17
|
+
its("targets.count") { should == 31 }
|
18
18
|
end
|