nicoscraper 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +2 -1
- data/README.md +11 -4
- data/VERSION +1 -1
- data/lib/nicoscraper.rb +1 -1
- data/nicoscraper.gemspec +79 -0
- data/test/movie_spec.rb +0 -123
- metadata +3 -2
data/.document
CHANGED
data/README.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
以下は[rubydoc](http://rubydoc.info/gems/nicoscraper/0.2.5/frames)からの転載です。詳細はこちらを御覧下さい。
|
2
|
+
|
3
|
+
|
1
4
|
NicoScraper
|
2
5
|
====================
|
3
6
|
|
@@ -295,13 +298,17 @@ Mylistクラスのインスタンス
|
|
295
298
|
|
296
299
|
###更新履歴
|
297
300
|
|
298
|
-
**
|
301
|
+
**v 0.2.6**
|
302
|
+
|
303
|
+
+ ドキュメントが正しく生成されていなかったので訂正。
|
304
|
+
|
305
|
+
**v 0.2.5**
|
299
306
|
|
300
307
|
+ ヘッダの追加
|
301
308
|
|
302
309
|
+ コードと設定の分離
|
303
310
|
|
304
|
-
**
|
311
|
+
**v 0.2.4**
|
305
312
|
|
306
313
|
+ ドキュメント作成
|
307
314
|
|
@@ -312,13 +319,13 @@ Mylistクラスのインスタンス
|
|
312
319
|
|
313
320
|
###今後の予定
|
314
321
|
|
315
|
-
**
|
322
|
+
**v 0.3**
|
316
323
|
|
317
324
|
+ HTMLから取得・解析するメソッドの追加。
|
318
325
|
|
319
326
|
+ キーワード検索の実装
|
320
327
|
|
321
|
-
**
|
328
|
+
**v 0.4-**
|
322
329
|
|
323
330
|
+ シリーズ性判定の強化。説明文中にある「次 sm***」等の表記を解析し、マイリストに頼らずにシリーズ性を判定するようにする。
|
324
331
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.6
|
data/lib/nicoscraper.rb
CHANGED
data/nicoscraper.gemspec
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{nicoscraper}
|
8
|
+
s.version = "0.2.6"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = [%q{Masami Yonehara}]
|
12
|
+
s.date = %q{2011-09-25}
|
13
|
+
s.description = %q{It scrape movies and mylists of Niconico douga.
|
14
|
+
}
|
15
|
+
s.email = %q{zeitdiebe@gmail.com}
|
16
|
+
s.extra_rdoc_files = [
|
17
|
+
"LICENSE.txt",
|
18
|
+
"README.md"
|
19
|
+
]
|
20
|
+
s.files = [
|
21
|
+
".document",
|
22
|
+
"Gemfile",
|
23
|
+
"Gemfile.lock",
|
24
|
+
"LICENSE.txt",
|
25
|
+
"README.md",
|
26
|
+
"Rakefile",
|
27
|
+
"VERSION",
|
28
|
+
"index.html",
|
29
|
+
"lib/classes/connector.rb",
|
30
|
+
"lib/classes/converter.rb",
|
31
|
+
"lib/classes/header.rb",
|
32
|
+
"lib/classes/movie.rb",
|
33
|
+
"lib/classes/mylist.rb",
|
34
|
+
"lib/classes/parser.rb",
|
35
|
+
"lib/classes/searcher.rb",
|
36
|
+
"lib/classes/tools.rb",
|
37
|
+
"lib/config/wait.rb",
|
38
|
+
"lib/nicoscraper.rb",
|
39
|
+
"nicoscraper.gemspec",
|
40
|
+
"test/movie_spec.rb",
|
41
|
+
"test/searcher_spec.rb"
|
42
|
+
]
|
43
|
+
s.homepage = %q{http://github.com/hdemon/nicoscraper}
|
44
|
+
s.licenses = [%q{MIT}]
|
45
|
+
s.require_paths = [%q{lib}]
|
46
|
+
s.rubygems_version = %q{1.8.8}
|
47
|
+
s.summary = %q{The scraper for Niconico douga.}
|
48
|
+
|
49
|
+
if s.respond_to? :specification_version then
|
50
|
+
s.specification_version = 3
|
51
|
+
|
52
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
53
|
+
s.add_runtime_dependency(%q<damerau-levenshtein>, [">= 0.5.3"])
|
54
|
+
s.add_runtime_dependency(%q<libxml-ruby>, [">= 2.2.2"])
|
55
|
+
s.add_development_dependency(%q<rake>, ["= 0.8.7"])
|
56
|
+
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
57
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
58
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
|
59
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
60
|
+
else
|
61
|
+
s.add_dependency(%q<damerau-levenshtein>, [">= 0.5.3"])
|
62
|
+
s.add_dependency(%q<libxml-ruby>, [">= 2.2.2"])
|
63
|
+
s.add_dependency(%q<rake>, ["= 0.8.7"])
|
64
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
65
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
66
|
+
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
67
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
68
|
+
end
|
69
|
+
else
|
70
|
+
s.add_dependency(%q<damerau-levenshtein>, [">= 0.5.3"])
|
71
|
+
s.add_dependency(%q<libxml-ruby>, [">= 2.2.2"])
|
72
|
+
s.add_dependency(%q<rake>, ["= 0.8.7"])
|
73
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
74
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
75
|
+
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
76
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
data/test/movie_spec.rb
CHANGED
@@ -87,126 +87,3 @@ describe Nicos::Mylist, "After executiton of 'getInfo' method" do
|
|
87
87
|
result .should >= 0.9
|
88
88
|
end
|
89
89
|
end
|
90
|
-
|
91
|
-
describe "When execute 'Nicos::Searcher::ByTag.execute' method " +
|
92
|
-
"and return a string except \"continue\" in this block" do
|
93
|
-
before(:all) do
|
94
|
-
searcher = Nicos::Searcher::ByTag.new()
|
95
|
-
@count = 0
|
96
|
-
|
97
|
-
searcher.execute("ゆっくり実況プレイpart1リンク", "post_old") { |result|
|
98
|
-
@count += 1
|
99
|
-
"not continue"
|
100
|
-
}
|
101
|
-
end
|
102
|
-
|
103
|
-
it "should end only one access." do
|
104
|
-
@count.should == 1
|
105
|
-
end
|
106
|
-
end
|
107
|
-
|
108
|
-
describe "When execute 'Nicos::Searcher::ByTag.execute' method " +
|
109
|
-
"and return a string except \"continue\" in this block" do
|
110
|
-
before(:all) do
|
111
|
-
searcher = Nicos::Searcher::ByTag.new()
|
112
|
-
@count = 0
|
113
|
-
|
114
|
-
searcher.execute("ゆっくり実況プレイpart1リンク", "post_old") { |result|
|
115
|
-
@count += 1
|
116
|
-
nil
|
117
|
-
}
|
118
|
-
end
|
119
|
-
|
120
|
-
it "should end only one access." do
|
121
|
-
@count.should == 1
|
122
|
-
end
|
123
|
-
end
|
124
|
-
|
125
|
-
describe "When execute 'Nicos::Searcher::ByTag.execute' method " +
|
126
|
-
"passing following argument" do
|
127
|
-
before(:all) do
|
128
|
-
searcher = Nicos::Searcher::ByTag.new()
|
129
|
-
count = 0
|
130
|
-
|
131
|
-
searcher.execute("ゆっくり実況プレイpart1リンク", "post_old") { |result|
|
132
|
-
@result = result
|
133
|
-
|
134
|
-
count += 1
|
135
|
-
puts count
|
136
|
-
"continue" unless count >= 3
|
137
|
-
}
|
138
|
-
puts "end"
|
139
|
-
end
|
140
|
-
|
141
|
-
it "should have Array of movie objects." do
|
142
|
-
@result .should be_kind_of(Array)
|
143
|
-
@result[0].should be_instance_of(Nicos::Movie)
|
144
|
-
end
|
145
|
-
|
146
|
-
it "should contains movie objects that have following structure." do
|
147
|
-
@result[0].available .should be_true
|
148
|
-
|
149
|
-
@result[0].video_id .should_not be_nil
|
150
|
-
@result[0].title .should_not be_nil
|
151
|
-
@result[0].create_time .should_not be_nil
|
152
|
-
@result[0].update_time .should_not be_nil
|
153
|
-
#@result[0].memo .should_not be_nil
|
154
|
-
@result[0].description .should_not be_nil
|
155
|
-
@result[0].thumbnail_url.should_not be_nil
|
156
|
-
@result[0].create_time .should_not be_nil
|
157
|
-
@result[0].update_time .should_not be_nil
|
158
|
-
@result[0].length .should_not be_nil
|
159
|
-
|
160
|
-
@result[0].view_counter .should_not be_nil
|
161
|
-
@result[0].comment_num .should_not be_nil
|
162
|
-
@result[0].mylist_counter.should_not be_nil
|
163
|
-
end
|
164
|
-
end
|
165
|
-
|
166
|
-
describe "When execute 'Nicos::Connector::setWait" do
|
167
|
-
before(:all) do
|
168
|
-
wait = {
|
169
|
-
'seqAccLimit' => 100,
|
170
|
-
|
171
|
-
'deniedSeqReq'=> {
|
172
|
-
'retryLimit' => 30,
|
173
|
-
'wait' => 1200
|
174
|
-
},
|
175
|
-
|
176
|
-
'serverIsBusy'=> {
|
177
|
-
'retryLimit' => 10
|
178
|
-
}
|
179
|
-
}
|
180
|
-
|
181
|
-
Nicos::Connector::Config::setWait(wait)
|
182
|
-
end
|
183
|
-
|
184
|
-
it "should have following values." do
|
185
|
-
c = Nicos::Searcher::ByTag.new()
|
186
|
-
c.waitConfig .should_not be_nil
|
187
|
-
c.waitConfig["seqAccLimit"]
|
188
|
-
.should == 100
|
189
|
-
c.waitConfig["afterSeq"]
|
190
|
-
.should == 10
|
191
|
-
c.waitConfig["each"]
|
192
|
-
.should == 1
|
193
|
-
c.waitConfig["increment"]
|
194
|
-
.should == 1
|
195
|
-
c.waitConfig["deniedSeqReq"]["retryLimit"]
|
196
|
-
.should == 30
|
197
|
-
c.waitConfig["deniedSeqReq"]["wait"]
|
198
|
-
.should == 1200
|
199
|
-
c.waitConfig["serverIsBusy"]["retryLimit"]
|
200
|
-
.should == 10
|
201
|
-
c.waitConfig["serverIsBusy"]["wait"]
|
202
|
-
.should == 120
|
203
|
-
c.waitConfig["serviceUnavailable"]["retryLimit"]
|
204
|
-
.should == 3
|
205
|
-
c.waitConfig["serviceUnavailable"]["wait"]
|
206
|
-
.should == 120
|
207
|
-
c.waitConfig["timedOut"]["retryLimit"]
|
208
|
-
.should == 3
|
209
|
-
c.waitConfig["timedOut"]["wait"]
|
210
|
-
.should == 10
|
211
|
-
end
|
212
|
-
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: nicoscraper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.2.
|
5
|
+
version: 0.2.6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Masami Yonehara
|
@@ -117,6 +117,7 @@ files:
|
|
117
117
|
- lib/classes/tools.rb
|
118
118
|
- lib/config/wait.rb
|
119
119
|
- lib/nicoscraper.rb
|
120
|
+
- nicoscraper.gemspec
|
120
121
|
- test/movie_spec.rb
|
121
122
|
- test/searcher_spec.rb
|
122
123
|
homepage: http://github.com/hdemon/nicoscraper
|
@@ -132,7 +133,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
132
133
|
requirements:
|
133
134
|
- - ">="
|
134
135
|
- !ruby/object:Gem::Version
|
135
|
-
hash:
|
136
|
+
hash: -219128366920593554
|
136
137
|
segments:
|
137
138
|
- 0
|
138
139
|
version: "0"
|