WWW::Battrick

Check-in [057be16f79]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:save_page
Timelines: family | ancestors | descendants | both | develop
Files: files | file ages | folders
SHA1:057be16f7993d8944a4659564c5db62ff92155ea
User & Date: erez.schatz@gmail.com 2011-09-08 16:31:31
Context
2011-09-08
16:55
columns check-in: 34a4835ab1 user: erez.schatz@gmail.com tags: develop
16:31
save_page check-in: 057be16f79 user: erez.schatz@gmail.com tags: develop
15:43
links check-in: 75c6486d72 user: erezs@teleweb.co.il tags: develop
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to lib/WWW/Battrick/Site.pm.

17
18
19
20
21
22
23
24
25
26
27
28



29
30
31



32
    $mech->form_id('login');
    $mech->set_fields(
        username => $user,
        password => $password,
    );
    $mech->click;

    $mech->get( 'http://battrick.org/nl/office.asp' );
    open
    $mech->get( 'http://battrick.org/nl/squad.asp' );
    $mech->get( 'http://battrick.org/nl/fixtures.asp' );
    $mech->get( 'http://battrick.org/nl/club.asp' );



    $mech->get( 'http://battrick.org/nl/finances.asp' );
    $mech->get( 'http://battrick.org/nl/nets.asp' );
    $mech->get( 'http://battrick.org/nl/ground.asp' );



}







|
|
<
<
<
>
>
>
|
|
|
>
>
>

17
18
19
20
21
22
23
24
25



26
27
28
29
30
31
32
33
34
35
    $mech->form_id('login');
    $mech->set_fields(
        username => $user,
        password => $password,
    );
    $mech->click;

    foreach my $page (qw/office squad fixtures club finances nets ground/) {
        save_page($page);



    }
}

sub save_page {
    my $page = shift;
    $mech->get( "http://battrick.org/nl/$page.asp" );
    open my $TEMP, '>', $page || die "Error opening $page temp file - $!\n";
    print $TEMP $mech->content;
    close $TEMP;
}