19 |
|
|
20 |
my $results = 0; |
my $results = 0; |
21 |
my $citations = 0; |
my $citations = 0; |
22 |
|
my $cited_reference = 0; # html tables |
23 |
|
my $citing_articles = 1; # as many files as cited articles |
24 |
|
|
25 |
my $cites_by_year = 0; |
my $cites_by_year = 0; |
26 |
|
|
120 |
last; |
last; |
121 |
} |
} |
122 |
|
|
123 |
|
if ( $mech->content =~ m{Please wait while your request is processed} ) { |
124 |
|
warn "WARNING: processing request"; |
125 |
|
} |
126 |
|
|
127 |
|
|
128 |
my $path = "/tmp/isi.$q.$from-$to"; |
my $path = "/tmp/isi.$q.$from-$to"; |
129 |
$path .= '.' . $desc if $desc; |
$path .= '.' . $desc if $desc; |
241 |
|
|
242 |
} |
} |
243 |
|
|
244 |
if ( $q =~ m{CA=(.+)} ) { |
if ( $q =~ m{CA=(.+)} && $cited_reference ) { |
245 |
|
|
246 |
my $CA = $1; |
my $CA = $1; |
247 |
|
|
291 |
|
|
292 |
} |
} |
293 |
|
|
294 |
|
if ( $q =~ m{CA=(.+)} && $citing_articles ) { |
295 |
|
|
296 |
|
search; |
297 |
|
|
298 |
|
my $orig_q = $q; |
299 |
|
my $nr = 0; |
300 |
|
|
301 |
|
foreach my $link ( $mech->find_all_links( url_regex => qr/CitingArticles.do/ ) ) { |
302 |
|
$nr++; |
303 |
|
warn "link $nr\n"; |
304 |
|
$mech->get( $link->url ); |
305 |
|
save_mech; |
306 |
|
$q = $orig_q . '.citing_article.' . $nr; |
307 |
|
get_results; |
308 |
|
$mech->back; |
309 |
|
save_mech; |
310 |
|
$mech->back; |
311 |
|
save_mech; |
312 |
|
} |
313 |
|
|
314 |
|
$q = $orig_q; |
315 |
|
} |
316 |
|
|
317 |
warn "OVER\n"; |
warn "OVER\n"; |