Changeset 9353 for lang/vim

Show
Ignore:
Timestamp:
04/12/08 22:24:03 (7 months ago)
Author:
ujihisa
Message:

lang/vim/misc/mixi.vim: fix bug

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/vim/misc/mixi.vim

    r7234 r9353  
    1212 
    1313class Mixi 
    14   def initialize(email, password) 
    15     @email, @password = email, password 
     14  def initialize(email, password, mixi_premium = false) 
     15    @email, @password, @mixi_premium = 
     16      email, password, mixi_premium 
    1617    @agent = WWW::Mechanize.new 
    1718    @agent.user_agent_alias = 'Mac Safari' 
     
    2728    page = @agent.get "http://mixi.jp/home.pl" 
    2829    page = @agent.get page.links[18].uri 
    29     form = page.forms[1] 
     30    form = page.forms[(@mixi_premium ? 1 : 0)] 
    3031    form.diary_title = title 
    3132    form.diary_body = body 
     
    4950 
    5051  m = Mixi.new 'YOUR_EMAIL', 'YOUR_PASSWORD' 
     52  # if you are mixi premium member: 
     53  # m = Mixi.new 'YOUR_EMAIL', 'YOUR_PASSWORD', true 
    5154  m.post title.toeuc, body.toeuc 
    5255  m.get_latest.each do |line|