/[webpac2]/trunk/bin/isi-download-results.pl
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 /trunk/bin/isi-download-results.pl

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

revision 1281 by dpavlin, Fri Sep 18 17:28:03 2009 UTC revision 1282 by dpavlin, Fri Sep 18 17:46:04 2009 UTC
# Line 4  use warnings; Line 4  use warnings;
4  use strict;  use strict;
5    
6  my $q = 'TS=psychology AND AD=Croatia';  my $q = 'TS=psychology AND AD=Croatia';
7    my $range_size = 50;
8    
9    my $dump = @ARGV ? 1 : 0;
10    
11    $q = 'AD=Croatia';
12    $range_size = 500;
13    
14  use WWW::Mechanize;  use WWW::Mechanize;
15  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
# Line 21  sub save_mech { Line 27  sub save_mech {
27          $path ||= sprintf('/tmp/isi.%02d.%s', $step, $mech->{ct} =~ m{html}i ? 'html' : 'txt' );          $path ||= sprintf('/tmp/isi.%02d.%s', $step, $mech->{ct} =~ m{html}i ? 'html' : 'txt' );
28          $mech->save_content( $path );          $mech->save_content( $path );
29          warn "# [$step] $path ", -s $path, " ", $mech->ct;          warn "# [$step] $path ", -s $path, " ", $mech->ct;
30          $mech->dump_all;          $mech->dump_all if $dump;
31  }  }
32    
33  warn "# get session";  warn "# get session";
# Line 46  $mech->follow_link( url_regex => qr/summ Line 52  $mech->follow_link( url_regex => qr/summ
52  save_mech $mech;  save_mech $mech;
53    
54  my $from = 1;  my $from = 1;
 my $range_size = 50;  
55    
56  while ( $from ) {  while ( $from ) {
57    

Legend:
Removed from v.1281  
changed lines
  Added in v.1282

  ViewVC Help
Powered by ViewVC 1.1.26