cookersjs has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to access a table written in HTML code from a website. Currently I am just trying to get the program to output the HTML code in the terminal so that I know I have captured the right code. From there I plan to use HTML::TableExtract. The problem I am having is that when using HTML::TreeBuilder, it only outputs the page source, which doesn't contain the table of interest.
use strict; use warnings; use HTML::TreeBuilder; my $url = "https://cancer.sanger.ac.uk/census"; my $tree = HTML::TreeBuilder->new_from_url($url); say $tree->as_HTML;
This is the output: view-source:https://cancer.sanger.ac.uk/census
What I am trying to access is the table under the 'Abbreviations' tab at this link: https://cancer.sanger.ac.uk/census
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to access a web pages HTML elements?
by huck (Prior) on Dec 13, 2016 at 20:54 UTC | |
by Anonymous Monk on Dec 14, 2016 at 13:25 UTC | |
|
Re: How to access a web pages HTML elements?
by 1nickt (Canon) on Dec 13, 2016 at 22:50 UTC | |
by cookersjs (Acolyte) on Dec 14, 2016 at 13:26 UTC |