This is really weird. For me, the below program works and outputs the HTML that I somewhat expect:
use strict; use WWW::Mechanize::PhantomJS; use Data::Dumper; my $mech = WWW::Mechanize::PhantomJS->new( launch_arg => ['ghostdriver/src/main.js' ], ); $mech->get('https://www.racingpost.com/tipping/naps-table/'); sleep 5; my $cont= $mech->selector('.tn-napsTable', one => 1 ); my $content=$cont->get_attribute('innerHTML'); print $content; __END__ <div class="tn-napsTable__header"><div class="tn-napsTable__main"><div + role="but ton" tabindex="0" class="tn-napsTable__cell tn-napsTable__cell_header +tn-napsTab le__napsTipster_header"><!-- react-text: 15 -->Today's naps / Tipster< +!-- /react -text --></div><div role="button" tabindex="0" class="tn-napsTable__ce +ll tn-naps ...
This is with PhantomJS v 2.1.1 on Windows and WWW::Mechanize::PhantomJS 0.18.
In reply to Re^3: No Elements Found with WWW::Mechanize::PhantomJS
by Corion
in thread No Elements Found with WWW::Mechanize::PhantomJS
by rmperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |