Skip to content

Need help with Mojo::Dom and collections #1928

Answered by Tekki
llarochelle asked this question in Q&A
Discussion options

You must be logged in to vote

In the best case you can address a tag that surrounds the text you want to read and extract it in one step. As with

my $dom = $ua->get('https://mojolicious.org')->res->dom;

say $dom->at('.mojo-fortune')->all_text;

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@llarochelle
Comment options

@Tekki
Comment options

@llarochelle
Comment options

Answer selected by llarochelle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants