my $results = 0;
my $citations = 0;
+my $cited_reference = 0; # html tables
+my $citing_articles = 1; # as many files as cited articles
my $cites_by_year = 0;
last;
}
+ if ( $mech->content =~ m{Please wait while your request is processed} ) {
+ warn "WARNING: processing request";
+ }
+
my $path = "/tmp/isi.$q.$from-$to";
$path .= '.' . $desc if $desc;
}
-if ( $q =~ m{CA=(.+)} ) {
+if ( $q =~ m{CA=(.+)} && $cited_reference ) {
my $CA = $1;
}
+if ( $q =~ m{CA=(.+)} && $citing_articles ) {
+
+ search;
+
+ my $orig_q = $q;
+ my $nr = 0;
+
+ foreach my $link ( $mech->find_all_links( url_regex => qr/CitingArticles.do/ ) ) {
+ $nr++;
+ warn "link $nr\n";
+ $mech->get( $link->url );
+ save_mech;
+ $q = $orig_q . '.citing_article.' . $nr;
+ get_results;
+ $mech->back;
+ save_mech;
+ $mech->back;
+ save_mech;
+ }
+
+ $q = $orig_q;
+}
+
warn "OVER\n";