Smeet2002 has asked for the wisdom of the Perl Monks concerning the following question:
I don't understand how to access an HTML table from a document.
I am playing with the job link(I am not able to post it here, but you can get it from here: Question on StackOverflow
)The idea is to click on "Next page" button several times and gather all small HTML tables into one.
When I open the link with WWW::Mechanize::Firefox, I can get the whole document (and first page HTML table) with my $cont= $mech->content( format => 'html' );
After that I click on "Next page" button with
my $id="search_result_next_page_link"; $mech->click({ xpath => qq{//*[\@id="$id"]}, synchronize => 0 });
I can click the button many times and the table is being changed inside the document, but I can not use $mech->content any more, because the URL is the same and content is not changing.
I tried something like @tt= $mech->xpathEx(xpath=>'/html/body/form/div[4]/div/main/div/div[3]/section/div/div/table/'); ,it gives me something like MozRepl::RemoteObject , but doesn't give me any idea how to get actual HTML table code.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to get an HTML table from the document using WWW::Mechanize::Firefox ?
by Corion (Patriarch) on Oct 28, 2014 at 19:39 UTC | |
by Smeet2002 (Initiate) on Oct 28, 2014 at 19:59 UTC | |
by Corion (Patriarch) on Oct 28, 2014 at 20:54 UTC | |
by Smeet2002 (Initiate) on Oct 29, 2014 at 02:25 UTC | |
by Corion (Patriarch) on Oct 29, 2014 at 08:00 UTC |