Hi Monks, how can I extract the email button the js button on this page:
https://reporter.nih.gov/project-details/10573139Here's some code I've written that gives me a pdf but I need to have the script click the button before I grab the pdf and I can't figure that out. I tried to see if I could 'tab' to it as I could automate that with 13 tabs and a return or something but the button doesn't select. Any ideas/help are greatly appreciated.
use strict; use File::Spec; use File::Basename 'dirname'; use Log::Log4perl qw(:easy); use WWW::Mechanize::Chrome; my $url = 'https://reporter.nih.gov/project-details/11011199'; my $mech = WWW::Mechanize::Chrome->new( headless => 1, # otherwise, PDF printing will not work ); print "Loading $url"; $mech->get($url); sleep 5; my $fn= 'screen.pdf'; my $page_pdf = $mech->content_as_pdf( filename => $fn, ); print "\nSaved $url as $fn\n";
In reply to How can I extract an email behind a JS button? by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |