/[Grep]/lib/Grep/Source.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/Grep/Source.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 135 by dpavlin, Wed May 2 09:37:06 2007 UTC revision 173 by dpavlin, Wed Jul 4 20:20:48 2007 UTC
# Line 325  sub scrape { Line 325  sub scrape {
325                  tree => $tree,                  tree => $tree,
326                  triplets => $args->{wrapper},                  triplets => $args->{wrapper},
327                  message => 'wrapper for all results',                  message => 'wrapper for all results',
328                  fatal => $args->{redirect_single_result} ? 0 : 1,                  # on closer recollection, this shouldn't be ever fatal, because
329                    # "no results found" page might not contain wrapper
330                    #fatal => $args->{redirect_single_result} ? 0 : 1,
331          );          );
332    
333          my $max = 15;          my $max = 15;
# Line 343  sub scrape { Line 345  sub scrape {
345                          tree => $tree,                          tree => $tree,
346                          message => "single result - redirect to $uri",                          message => "single result - redirect to $uri",
347                          triplets => $args->{scrape},                          triplets => $args->{scrape},
348                          fatal => 1,                          fatal => 0,
349                  );                  );
350    
351                  $self->add_record(                  $self->add_record(
# Line 382  sub scrape { Line 384  sub scrape {
384                          $page_uri->query( undef );                          $page_uri->query( undef );
385                          $page_uri = $page_uri->canonical;                          $page_uri = $page_uri->canonical;
386    
387                            if ( my $item = Grep::Model::Item->link_current( $page_uri ) ) {
388                                    Jifty->log->debug("using cached page for $page_uri");
389                                    $self->collection->add_record( $item );
390                                    next;
391                            }
392    
393                          $self->log->debug("fetching page: ",$a->as_text," from $page_uri");                          $self->log->debug("fetching page: ",$a->as_text," from $page_uri");
394                          if ( $mech->follow_link( url => $href ) ) {                          if ( $mech->follow_link( url => $href ) ) {
395    

Legend:
Removed from v.135  
changed lines
  Added in v.173

  ViewVC Help
Powered by ViewVC 1.1.26