Changeset 12287

Show
Ignore:
Timestamp:
05/24/08 23:47:18 (5 years ago)
Author:
tokuhirom
Message:

fixed xpath bug.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/WWW-MobileCarrierJP/trunk/lib/WWW/MobileCarrierJP/ThirdForce/CIDR.pm

    r12286 r12287  
    99sub scrape { 
    1010    scraper { 
    11         process '//td[@bgcolor="#eeeeee"]/font[@size="2" and @class="j10"]', 'cidr[]', ['TEXT', sub { 
    12                         m{^([0-9.]+)(/[0-9]+)}; 
    13                         +{ ip => $1, subnetmask => $2 }; 
    14                     }]; 
     11        process q{//div[@class='contents']/table/tr[7]/td/table/tr/td/table/tr}, 
     12          'cidr[]', [ 
     13            'TEXT', 
     14            sub { 
     15                s/\s//g 
     16            }, 
     17            sub { 
     18                m{^([0-9.]+)(/[0-9]+)}; 
     19                +{ ip => $1, subnetmask => $2 }; 
     20              } 
     21          ]; 
    1522    }->scrape(URI->new($url))->{cidr}; 
    1623}