On Sat, Feb 21, 2015 at 1:46 AM, j.kenneth fraac <[email protected]> wrote:

> I'm really new to web stuff, I've only used LWP::Simple to get pages, but
> this isn't adequate to get the numbers from the table here: <
> http://sizzlingstats.com/stats/200996>. Mojo::UserAgent seems strong
> enough but what would the 'get' look like?
>

I'm not sure exactly what numbers you're looking for, but it looks like
there's a great deal of info from JSON docs within the api version of the
URL:

$ mojo get http://sizzlingstats.com/api/stats/342935

$ cat /tmp/stats
use Mojolicious::Lite;
my $tx = app->ua->get('http://sizzlingstats.com/api/stats/342935');
#say app->dumper($tx->res->json);
say app->dumper($tx->res->json->{stats}->{bluscore}->[2]);

$ perl /tmp/stats

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to