Changeset 814
- Timestamp:
- 05/24/06 20:09:28
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/plagger/lib/Plagger/Plugin/CustomFeed/Frepa.pm
r810 r814 129 129 my $start_url = 'http://www.frepa.livedoor.com/'; 130 130 my $res = $self->{mech}->get($start_url); 131 return 0unless $self->{mech}->success;131 return unless $self->{mech}->success; 132 132 133 133 if ($self->{mech}->content =~ /loginside/) { 134 unless ($args{livedoor_id} && $args{password}) { 135 Plagger->context->log(error => "Error logging in using existent Cookies. Your User-Agent (" . $self->{mech}->agent . ") should strictly match with the UA used with the Cookies."); 136 return; 137 } 138 134 139 Plagger->context->log(debug => "cookie not found. logging in"); 135 140 $self->{mech}->submit_form( … … 141 146 ); 142 147 $self->{mech}->submit; 143 return 0unless $self->{mech}->success;144 return 0if $self->{mech}->content =~ /loginside/;148 return unless $self->{mech}->success; 149 return if $self->{mech}->content =~ /loginside/; 145 150 } 146 151
