nicovideo 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +6 -0
- data/lib/nicovideo/ranking.rb +1 -2
- data/lib/nicovideo/version.rb +1 -1
- data/sample/nv_ranking.rb +21 -0
- metadata +3 -2
data/ChangeLog
CHANGED
data/lib/nicovideo/ranking.rb
CHANGED
@@ -9,11 +9,10 @@ module Nicovideo
|
|
9
9
|
self.register_getter ["videos"]
|
10
10
|
end
|
11
11
|
|
12
|
-
# call whenever pagenum changed
|
13
12
|
def url
|
14
13
|
url = "#{BASE_URL}/ranking/#{@type}/#{@span}/#{@category}"
|
15
14
|
if @pagenum
|
16
|
-
url += '?page=' + pagenum.to_s
|
15
|
+
url += '?page=' + @pagenum.to_s
|
17
16
|
end
|
18
17
|
url
|
19
18
|
end
|
data/lib/nicovideo/version.rb
CHANGED
@@ -0,0 +1,21 @@
|
|
1
|
+
#!/usr/bin/ruby -Ku
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'nicovideo'
|
5
|
+
|
6
|
+
conf = YAML.load_file(ENV['HOME'] + '/.nicovideo/account.yml')
|
7
|
+
nv = Nicovideo.new(conf['mail'], conf['password'])
|
8
|
+
|
9
|
+
cnt = 0
|
10
|
+
nv.ranking.each do |vp|
|
11
|
+
cnt += 1
|
12
|
+
printf "%3d位 %-12s %s \n", cnt, vp.video_id, vp.title
|
13
|
+
end
|
14
|
+
|
15
|
+
=begin
|
16
|
+
# when using more options
|
17
|
+
nv.ranking(type='mylist', span='daily', category='all', pagenum='1').each do |vp|
|
18
|
+
cnt += 1
|
19
|
+
printf "%3d位 %-12s %s \n", cnt, vp.video_id, vp.title
|
20
|
+
end
|
21
|
+
=end
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: nicovideo
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.1.
|
7
|
-
date: 2008-02-
|
6
|
+
version: 0.1.1
|
7
|
+
date: 2008-02-25 00:00:00 +09:00
|
8
8
|
summary: utils for nicovideo
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -60,6 +60,7 @@ files:
|
|
60
60
|
- sample/nv_download2.rb
|
61
61
|
- sample/nv_mylist.rb
|
62
62
|
- sample/nv_openlist.rb
|
63
|
+
- sample/nv_ranking.rb
|
63
64
|
test_files:
|
64
65
|
- test/test_openlist.rb
|
65
66
|
- test/test_nicovideo.rb
|