Changeset 2607 for cpc/trunk/project/batch
- Timestamp:
- Jan 30, 2012, 8:38:49 AM (9 years ago)
- Location:
- cpc/trunk/project/batch/commission
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
cpc/trunk/project/batch/commission/download_commission.pl
r2552 r2607 48 48 push(@url, "http://www.assemblee-nationale.fr/13/cr-mec/$session/index.asp"); 49 49 } 50 push(@url, "http://www.assemblee-nationale.fr/13/cr-micompetitivite/10-11/index.asp"); 51 push(@url, "http://www.assemblee-nationale.fr/13/cr-micompetitivite/11-12/index.asp"); 52 push(@url, "http://www.assemblee-nationale.fr/13/cr-mitoxicomanie/10-11/index.asp"); 53 push(@url, "http://www.assemblee-nationale.fr/13/cr-cegrippea/09-10/"); 50 54 51 55 $a = WWW::Mechanize->new(); -
cpc/trunk/project/batch/commission/parse_commission.pl
r2588 r2607 91 91 $cpt = 0; 92 92 sub checkout { 93 $commission =~ s/"//g; 93 94 $cpt+=10; 94 95 $out = '{"commission": "'.$commission.'", "intervention": "'.$intervention.'", "timestamp": "'.$cpt.'", "date": "'.$date.'", "source": "'.$source.'", "heure":"'.$heure.'", "session": "'.$session.'", '; … … 215 216 foreach $line (split /\n/, $string) 216 217 { 218 #print "TEST: ".$line."\n"; 217 219 if ($line =~ /<h[1-9]+/i || $line =~ /"presidence"/) { 218 220 if ($line =~ /pr..?sidence de (M[^<\,]+)[<,]/i && $line !~ /sarkozy/i) { … … 237 239 if ($line =~ /<a name=["']([^"']+)["']/) { 238 240 $source = $url."#$1"; 239 }elsif($line =~ /class="menu"/ && $line =~ /<a[^>]+>([^<]+)< /) {241 }elsif($line =~ /class="menu"/ && $line =~ /<a[^>]+>([^<]+)<?/) { 240 242 $test = $1; 241 243 if (!$commission && $test =~ /Commission|mission/) { -
cpc/trunk/project/batch/commission/parse_presents.pl
r1691 r2607 49 49 return ; 50 50 } 51 $commission =~ s/"//g; 51 52 foreach $depute (@presents) { 52 53 $depute =~ s/[\/<\|]//g; … … 86 87 if ($line =~ /<a name=["']([^"']+)["']/) { 87 88 $source = $url."#$1"; 88 }elsif($line =~/class="menu"/ && $line =~ /<a[^>]+>([^<]+)< /) {89 }elsif($line =~/class="menu"/ && $line =~ /<a[^>]+>([^<]+)<?/) { 89 90 $test = $1; 90 91 if (!$commission && $test =~ /Commission|mission/) {
Note: See TracChangeset
for help on using the changeset viewer.