Skip to content

Commit

Permalink
Use mail_tel parameter for logging in
Browse files Browse the repository at this point in the history
http://blog.nicovideo.jp/niconews/ni051130.html

They now have new login page.

They have kept old parameter name work, but following the present state
for future change.
  • Loading branch information
sorah committed Jan 29, 2015
1 parent e77edfe commit ca87b26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/niconico.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class LoginError < StandardError; end
private

def login_with_email
page = @agent.post(URL[:login], 'mail' => @mail, 'password' => @pass)
page = @agent.post(URL[:login], 'mail_tel' => @mail, 'password' => @pass)

raise LoginError, "Failed to log in (x-niconico-authflag is 0)" if page.header["x-niconico-authflag"] == '0'
@token = nil
Expand Down

0 comments on commit ca87b26

Please sign in to comment.