Last active
January 27, 2016 16:45
-
-
Save jamadam/5d22fc50688d89b1bd3d to your computer and use it in GitHub Desktop.
original code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# login | |
my $tx1 = $ua->get($urlbase->clone->path('/admin/login')); | |
my $tx2 = post_form_by_dom($tx1->res->dom->at('#form'), $ua, $urlbase, { | |
'_method' => 'POST', | |
'data[AdminUser][username]' => 'test', | |
'data[AdminUser][password]' => 'test', | |
}); | |
$tx2->res->dom->find('.container td a')->each(sub($a, $) { | |
my $url = $urlbase->clone->parse($a->attr('href')); | |
my $size = $a->text(); | |
my $expected = $size > 100 ? 100 : $size; | |
my $tx3 = $ua->get($url); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
simplified a little.