Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^5: Running JavaScript from within Perl (or just use the API)

by marto (Archbishop)
on Sep 21, 2019 at 16:31 UTC ( #11106502=note: print w/replies, xml ) Need Help??


in reply to Re^4: Running JavaScript from within Perl (or just use the API)
in thread Running JavaScript from within Perl

Lets take it back a step, there's various ways to achieve what you want. Perhaps this example is clearer:

#!/usr/bin/perl use strict; use warnings; use Mojo::UserAgent; my $url = 'https://public-api.wordpress.com/rest/v1/read/feed/?url=the +-art-of-autism.com'; my $ua = Mojo::UserAgent->new; my $json = $ua->get( $url )->res->json; for my $feed ( @{$json->{feeds}} ){ if ( $feed->{meta}{links}{feed} ){ print "$feed->{meta}{links}{feed}\n"; } }

For each entry in feeds, print the value of meta->links->feed.

Update: see Re^4: Running JavaScript from within Perl (or just use the API).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11106502]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (13)
As of 2019-10-17 15:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?