Changeset 451
- Timestamp:
- 04/01/06 15:39:24
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/plagger/lib/Plagger/Plugin/Aggregator/Xango.pm
r442 r451 5 5 6 6 package Plagger::Plugin::Aggregator::Xango; 7 #sub Xango::DEBUG { 1 };8 7 use strict; 9 8 use base qw( Plagger::Plugin::Aggregator::Simple ); … … 18 17 Alias => 'xgbroker', 19 18 HandlerAlias => 'xghandler', 20 HttpCompArgs => [ Agent => "Plagger/$Plagger::VERSION (http://plagger.org/)" ],19 HttpCompArgs => [ Agent => "Plagger/$Plagger::VERSION (http://plagger.org/)", Timeout => $self->conf->{timeout} || 10 ], 21 20 %{$self->conf->{xango_args} || {}}, 22 21 ); … … 102 101 my $url = $job->uri; 103 102 if ($r->code =~ /^30[12]$/) { 104 $_[KERNEL]->post($_[HEAP]->{BROKER_ALIAS}, 'enqueue_job', Xango::Job->new(uri => URI->new($r->header('location')), redirect => $redirect)); 103 $url = $r->header('location'); 104 return unless $url =~ m!^https?://!i; 105 $_[KERNEL]->post($_[HEAP]->{BROKER_ALIAS}, 'enqueue_job', Xango::Job->new(uri => URI->new($url), redirect => $redirect)); 106 return; 105 107 } else { 106 108 return unless $r->is_success; … … 113 115 if (@feeds) { 114 116 $url = $feeds[0]; 117 return unless $url =~ m!^https?://!i; 115 118 $_[KERNEL]->post($_[HEAP]->{BROKER_ALIAS}, 'enqueue_job', Xango::Job->new(uri => URI->new($url), redirect => $redirect)); 116 } else {117 return;118 119 } 120 return; 119 121 } 120 122 }
