Skip to content

Instantly share code, notes, and snippets.

@lopnor
Created September 3, 2011 09:07
Show Gist options
  • Save lopnor/1190895 to your computer and use it in GitHub Desktop.
Save lopnor/1190895 to your computer and use it in GitHub Desktop.
#!perl
use strict;
use warnings;
use Config::Pit;
use Web::Scraper;
use WWW::Mechanize;
use Data::Dumper;
my $config = pit_get('smbc-card.com');
my $mech = WWW::Mechanize->new;
$mech->get('https://www.smbc-card.com/mem/top/index.jsp');
$mech->submit_form(
form_name => 'InForm',
fields => {
userid => $config->{username},
password => $config->{password},
},
);
$mech->get('https://www.smbc-card.com/vp/web_meisai/web_meisai_top.do');
$mech->follow_link(url_regex => qr/web_meisai_csv.do/);
print $mech->res->decoded_content;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment