Skip to content

Instantly share code, notes, and snippets.

@hesco

hesco/results Secret

Last active February 21, 2016 23:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hesco/900080d9f70bc3abfc9c to your computer and use it in GitHub Desktop.
Save hesco/900080d9f70bc3abfc9c to your computer and use it in GitHub Desktop.
using ->text keeps producing this:
$VAR1 = '';
and ->xml tells me
$VAR1 = undef;
even though $web_page_content includes a full page resulting from a Mojo::UA->get( $url ),
which I have inspected and found working.
Dumping the $dom->at() object shows me a Mojo::DOM::HTML object, populated with content.
But I seem unable to render the content of my object in any sort of useful way.
my $ua = Mojo::UserAgent->new;
my $web_page_content = $ua->get( $email_content_url )->res->body;
# print STDERR Dumper( $web_page_content );
my $dom = Mojo::DOM->new( $web_page_content );
my $email_content = $dom->at( 'div#content-wrapper' )->text;
print STDERR Dumper( $email_content );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment