Ignore:
Timestamp:
Oct 5, 2011, 3:05:24 AM (10 years ago)
Author:
goya
Message:

automatise année dans dl commmissions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpc/trunk/project/batch/commission/download_commission.pl

    r1741 r2382  
    3636}
    3737
     38$a = WWW::Mechanize->new(autocheck => 0);
     39
    3840@url = keys %url;
    39 push(@url, "http://www.assemblee-nationale.fr/13/budget/plf2011/commissions_elargies/cr/", "http://www.assemblee-nationale.fr/13/budget/plf2010/commissions_elargies/cr/", "http://www.assemblee-nationale.fr/13/cr-mec/07-08/index.asp", "http://www.assemblee-nationale.fr/13/cr-mec/08-09/index.asp", "http://www.assemblee-nationale.fr/13/cr-mec/09-10/index.asp", "http://www.assemblee-nationale.fr/13/cr-mec/10-11/index.asp");
     41
     42$lastyear = localtime(time);
     43$lastyear =~ s/^.*\s(\d{4})$/$1/;
     44for $year (2007 .. $lastyear) {
     45  $session = sprintf('%02d-%02d', $year-2001, $year-2000);
     46  push(@url, "http://www.assemblee-nationale.fr/13/budget/plf$year/commissions_elargies/cr/");
     47  push(@url, "http://www.assemblee-nationale.fr/13/cr-mec/$session/index.asp");
     48}
     49
    4050$a = WWW::Mechanize->new();
    4151
Note: See TracChangeset for help on using the changeset viewer.