Changeset 900

Show
Ignore:
Timestamp:
06/02/06 20:09:58
Author:
miyagawa
Message:

support cookies in ParallelUA

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Plugin/Filter/FetchEnclosure/ParallelUA.pm

    r876 r900  
    55use LWP::Parallel::UserAgent; 
    66use HTTP::Request; 
     7use Plagger::Cookies; 
    78 
    89sub register { 
     
    2122    $self->{ua}->max_hosts( $self->conf->{concurrency} || 10 ); 
    2223    $self->{ua}->max_req( $self->conf->{max_requests_per_host} || 2 ); 
     24 
     25    my $conf = Plagger->context->conf->{user_agent}; 
     26    if ($conf->{cookies}) { 
     27        $self->{ua}->cookie_jar( Plagger::Cookies->create($conf->{cookies}) ); 
     28    } 
    2329} 
    2430