niconico 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/niconico/version.rb +1 -1
- data/lib/niconico/video.rb +3 -1
- metadata +1 -1
data/lib/niconico/version.rb
CHANGED
data/lib/niconico/video.rb
CHANGED
@@ -7,7 +7,7 @@ class Niconico
|
|
7
7
|
end
|
8
8
|
|
9
9
|
class Video
|
10
|
-
DEFERRABLES = [:id, :title, :url, :video_url, :type, :tags, :mylist_comment]
|
10
|
+
DEFERRABLES = [:id, :title, :url, :video_url, :type, :tags, :mylist_comment, :description, :description_raw]
|
11
11
|
DEFERRABLES_VAR = DEFERRABLES.map{|k| :"@#{k}" }
|
12
12
|
|
13
13
|
DEFERRABLES.zip(DEFERRABLES_VAR).each do |(k,i)|
|
@@ -50,6 +50,8 @@ class Niconico
|
|
50
50
|
getflv = Hash[@agent.get_file("#{Niconico::URL[:getflv]}?v=#{@thread_id}").scan(/([^&]+)=([^&]+)/).map{|(k,v)| [k.to_sym,CGI.unescape(v)] }]
|
51
51
|
|
52
52
|
@title = @page.at("#video_title").inner_text
|
53
|
+
@description = @page.at("#itab_description p").inner_text
|
54
|
+
@description_raw = @page.at("#itab_description p").inner_html
|
53
55
|
@video_url = getflv[:url]
|
54
56
|
@eco = !(/low$/ =~ @video_url).nil?
|
55
57
|
@type = case @video_url.match(/^http:\/\/(.+\.)?nicovideo\.jp\/smile\?(.+?)=.*$/).to_a[2]
|