Changeset 29595 for lang/perl/WWW-PASMO
- Timestamp:
- 02/06/09 00:59:26 (4 years ago)
- Files:
-
- 1 modified
-
lang/perl/WWW-PASMO/trunk/lib/WWW/PASMO.pm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/WWW-PASMO/trunk/lib/WWW/PASMO.pm
r29448 r29595 5 5 our $VERSION = '0.00'; 6 6 7 use WWW::Mechanize ;7 use WWW::Mechanize::Pluggable; 8 8 use Web::Scraper; 9 9 … … 11 11 my ($class, %opt) = @_; 12 12 my $self = bless { 13 mech => WWW::Mechanize ->new13 mech => WWW::Mechanize::Pluggable->new 14 14 }, $class; 15 15 $self; … … 31 31 my ($self) = @_; 32 32 33 my $resp =$self->{mech}->follow_link( url => 'CardStatusWebForm.aspx' );34 scraper {35 process'//form/table[2]/tr[4]/td/table/tr[9]/td/table/tr[@bgcolor="#eeeeee"]',36 'histories[]' =>scraper {33 $self->{mech}->follow_link( url => 'CardStatusWebForm.aspx' ); 34 $self->{mech}->scrape( 35 '//form/table[2]/tr[4]/td/table/tr[9]/td/table/tr[@bgcolor="#eeeeee"]', 36 'histories[]', scraper { 37 37 process '//td[1]', 'date' => [ 'text', sub { s!(\d{2})(\d{2})!$1/$2! } ]; 38 38 process '.', 'info1' => scraper { … … 45 45 }; 46 46 process '//td[6]', 'balance' => [ 'text', sub { s/^\*+// } ]; 47 }; 48 }->scrape($resp); 47 }); 49 48 } 50 49
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)