Changeset 627
- Timestamp:
- 04/20/06 15:24:24
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/plagger/lib/Plagger/Plugin/Subscription/LivedoorReader.pm
r625 r627 25 25 sub init_reader { 26 26 my $self = shift; 27 $self->{mech} = WWW::Mechanize->new ;27 $self->{mech} = WWW::Mechanize->new(cookie_jar => $self->cache->cookie_jar); 28 28 29 29 unless (defined($self->conf->{username}) && defined($self->conf->{password})) { … … 115 115 $self->{mech}->get("http://reader.livedoor.com/reader/"); 116 116 117 $self->{mech}->submit_form( 118 form_name => 'loginForm', 119 fields => { 120 livedoor_id => $self->conf->{username}, 121 password => $self->conf->{password}, 122 }, 123 ); 117 if ($self->{mech}->content =~ /name="loginForm"/) { 118 Plagger->context->log(debug => "Logging in to Livedoor Reader"); 119 $self->{mech}->submit_form( 120 form_name => 'loginForm', 121 fields => { 122 livedoor_id => $self->conf->{username}, 123 password => $self->conf->{password}, 124 }, 125 ); 124 126 125 if ( $self->{mech}->content =~ /class="headcopy"/ ) { 126 Plagger->context->error("Failed to login using username & password"); 127 if ( $self->{mech}->content =~ /class="headcopy"/ ) { 128 Plagger->context->error("Failed to login using username & password"); 129 } 127 130 } 128 131 }
