nicovideo 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +9 -0
- data/lib/nicovideo/mechanize-ext.rb +12 -5
- data/lib/nicovideo/page.rb +2 -2
- data/lib/nicovideo/version.rb +1 -1
- metadata +63 -45
data/ChangeLog
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
2008-10-09 version 0.1.7
|
2
|
+
|
3
|
+
* fixed subtitle of Nicovideo (summer -> autumn)
|
4
|
+
* fixed mechanize-ext for mechanize 0.8.4
|
5
|
+
|
6
|
+
2008-07-23 version 0.1.6
|
7
|
+
|
8
|
+
* added forgotten file to be added
|
9
|
+
|
1
10
|
2008-07-17 version 0.1.5
|
2
11
|
|
3
12
|
* fixed subtitle of Nicovideo (SP1 -> summer)
|
@@ -6,13 +6,20 @@ module WWW
|
|
6
6
|
self.class_eval {
|
7
7
|
def post_data(url, data='', enctype=nil)
|
8
8
|
cur_page = current_page || Page.new( nil, {'content-type'=>'text/html'})
|
9
|
+
|
9
10
|
request_data = data
|
10
|
-
abs_url = to_absolute_uri(url, cur_page)
|
11
|
-
request = fetch_request(abs_url, :post)
|
12
|
-
request.add_field('Content-Length', request_data.size.to_s)
|
13
11
|
|
14
|
-
|
15
|
-
|
12
|
+
log.debug("query: #{ request_data.inspect }") if log
|
13
|
+
|
14
|
+
# fetch the page
|
15
|
+
page = fetch_page( :uri => url,
|
16
|
+
:referer => cur_page,
|
17
|
+
:verb => :post,
|
18
|
+
:params => [request_data],
|
19
|
+
:headers => {
|
20
|
+
'Content-Length' => request_data.size.to_s,
|
21
|
+
})
|
22
|
+
add_to_history(page)
|
16
23
|
page
|
17
24
|
end
|
18
25
|
|
data/lib/nicovideo/page.rb
CHANGED
@@ -6,8 +6,8 @@ module Nicovideo
|
|
6
6
|
NV_DEBUG_LEVEL = 0
|
7
7
|
|
8
8
|
BASE_URL = 'http://www.nicovideo.jp'
|
9
|
-
BASE_TITLE1 = '‐ニコニコ動画\(
|
10
|
-
BASE_TITLE2 = 'ニコニコ動画\(
|
9
|
+
BASE_TITLE1 = '‐ニコニコ動画\(秋\)'.toutf8
|
10
|
+
BASE_TITLE2 = 'ニコニコ動画\(秋\)‐'.toutf8
|
11
11
|
|
12
12
|
def initialize agent
|
13
13
|
@agent = agent
|
data/lib/nicovideo/version.rb
CHANGED
metadata
CHANGED
@@ -1,33 +1,45 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.4
|
3
|
-
specification_version: 1
|
4
2
|
name: nicovideo
|
5
3
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.1.
|
7
|
-
date: 2008-07-23 00:00:00 +09:00
|
8
|
-
summary: utils for nicovideo
|
9
|
-
require_paths:
|
10
|
-
- lib
|
11
|
-
email: emergent22 (at) livedoor.com
|
12
|
-
homepage: http://nicovideo.rubyforge.org
|
13
|
-
rubyforge_project: nicovideo
|
14
|
-
description: utils for nicovideo
|
15
|
-
autorequire:
|
16
|
-
default_executable:
|
17
|
-
bindir: bin
|
18
|
-
has_rdoc: true
|
19
|
-
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
-
requirements:
|
21
|
-
- - ">"
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 0.0.0
|
24
|
-
version:
|
4
|
+
version: 0.1.7
|
25
5
|
platform: ruby
|
26
|
-
signing_key:
|
27
|
-
cert_chain:
|
28
|
-
post_install_message:
|
29
6
|
authors:
|
30
7
|
- emergent
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2008-10-09 00:00:00 +09:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: mechanize
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.6.0
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: hoe
|
27
|
+
type: :development
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.7.0
|
34
|
+
version:
|
35
|
+
description: utils for nicovideo
|
36
|
+
email: emergent22 (at) livedoor.com
|
37
|
+
executables: []
|
38
|
+
|
39
|
+
extensions: []
|
40
|
+
|
41
|
+
extra_rdoc_files:
|
42
|
+
- README.txt
|
31
43
|
files:
|
32
44
|
- README.txt
|
33
45
|
- ChangeLog
|
@@ -66,6 +78,33 @@ files:
|
|
66
78
|
- sample/nv_mylist.rb
|
67
79
|
- sample/nv_openlist.rb
|
68
80
|
- sample/nv_ranking.rb
|
81
|
+
has_rdoc: true
|
82
|
+
homepage: http://nicovideo.rubyforge.org
|
83
|
+
post_install_message:
|
84
|
+
rdoc_options:
|
85
|
+
- --main
|
86
|
+
- README.txt
|
87
|
+
require_paths:
|
88
|
+
- lib
|
89
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
90
|
+
requirements:
|
91
|
+
- - ">="
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: "0"
|
94
|
+
version:
|
95
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: "0"
|
100
|
+
version:
|
101
|
+
requirements: []
|
102
|
+
|
103
|
+
rubyforge_project: nicovideo
|
104
|
+
rubygems_version: 1.3.0
|
105
|
+
signing_key:
|
106
|
+
specification_version: 2
|
107
|
+
summary: utils for nicovideo
|
69
108
|
test_files:
|
70
109
|
- test/test_openlist.rb
|
71
110
|
- test/test_thumbnail.rb
|
@@ -79,24 +118,3 @@ test_files:
|
|
79
118
|
- test/test_login.rb
|
80
119
|
- test/test_random.rb
|
81
120
|
- test/test_search.rb
|
82
|
-
rdoc_options:
|
83
|
-
- --main
|
84
|
-
- README.txt
|
85
|
-
extra_rdoc_files:
|
86
|
-
- README.txt
|
87
|
-
executables: []
|
88
|
-
|
89
|
-
extensions: []
|
90
|
-
|
91
|
-
requirements: []
|
92
|
-
|
93
|
-
dependencies:
|
94
|
-
- !ruby/object:Gem::Dependency
|
95
|
-
name: mechanize
|
96
|
-
version_requirement:
|
97
|
-
version_requirements: !ruby/object:Gem::Version::Requirement
|
98
|
-
requirements:
|
99
|
-
- - ">="
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
version: 0.6.0
|
102
|
-
version:
|