niconico 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f3206a2fa1c511105d47e732cdfc0a112c324e96
4
- data.tar.gz: 393d00222c2354bcd57fca25e24b6f863bfbc100
3
+ metadata.gz: 51a70da9e364d8d29e8fd3f9834056d211957cc8
4
+ data.tar.gz: 952d992157597985457145d55bb2df3702f45d2d
5
5
  SHA512:
6
- metadata.gz: df5ee49a049b077e2bc7fe61597d003cdd3dfa12663e4ea118acc1e9f32bc74b0eb4274f226071493d39ba6ae1d9a46abc7789e446ae16780c0b46ad94e1b7fd
7
- data.tar.gz: f3ec9f17c59f053471c8cf34ae7874b3216f569824d09259e9ef8849a0af6dd56362aea5d46962eb811974109b1fd8981bddb9d4c3bff5ada07939891adee54d
6
+ metadata.gz: a633dad1e1abc5935908492f742b93af3e2a863506a046d6ba9984e9bbd1e06037a62185831549253c106265db81eb751a401fe61cca6b4cec47d039a55d3772
7
+ data.tar.gz: 4091116e411bd79762ed660fb42f5ac994606f6092143ef08c46210037b1998cb3da0071e245db1561330bc1abcde344b7d160069d3e02715149fba60b3fd2e4
@@ -12,8 +12,6 @@ class Niconico
12
12
  getflv: 'http://flapi.nicovideo.jp/api/getflv'
13
13
  }
14
14
 
15
- TEST_VIDEO_ID = "sm9"
16
-
17
15
  attr_reader :agent
18
16
 
19
17
  def logged_in?; @logged_in; end
@@ -37,7 +35,6 @@ class Niconico
37
35
 
38
36
  @agent = Mechanize.new.tap do |agent|
39
37
  agent.user_agent = "Niconico.gem (#{Niconico::VERSION}, https://github.com/sorah/niconico)"
40
- agent.ssl_version = 'SSLv3'
41
38
 
42
39
  agent.cookie_jar.add(
43
40
  HTTP::Cookie.new(
@@ -84,7 +81,7 @@ class Niconico
84
81
  def login_with_email
85
82
  page = @agent.post(URL[:login], 'mail' => @mail, 'password' => @pass)
86
83
 
87
- raise LoginError, "Failed to login (x-niconico-authflag is 0)" if page.header["x-niconico-authflag"] == '0'
84
+ raise LoginError, "Failed to log in (x-niconico-authflag is 0)" if page.header["x-niconico-authflag"] == '0'
88
85
  @token = nil
89
86
  @logged_in = true
90
87
  end
@@ -98,7 +95,7 @@ class Niconico
98
95
  )
99
96
 
100
97
  page = @agent.get(URL[:top])
101
- raise LoginError, "Failed to login (x-niconico-authflag is 0)" if page.header["x-niconico-authflag"] == '0'
98
+ raise LoginError, "Failed to log in (x-niconico-authflag is 0)" if page.header["x-niconico-authflag"] == '0'
102
99
 
103
100
  @logged_in = true
104
101
  end
@@ -24,7 +24,7 @@ class Niconico
24
24
  comment_area = page.at("#comment_area#{id}").inner_text
25
25
 
26
26
  result = {
27
- title: page.at('h2 span').inner_text,
27
+ title: page.at('h2 span[itemprop="name"]').inner_text,
28
28
  id: id,
29
29
  description: page.at('.stream_description .text_area').inner_html,
30
30
  }
@@ -1,3 +1,3 @@
1
1
  class Niconico
2
- VERSION = "1.5.0"
2
+ VERSION = "1.6.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: niconico
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shota Fukumori (sora_h)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-24 00:00:00.000000000 Z
11
+ date: 2014-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mechanize