Changeset 1700
- Timestamp:
- Oct 7, 2010, 1:05:25 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpc/trunk/project/batch/depute/parse_depute.pl
r1239 r1700 24 24 $depute{'Sexe'} = ($depute{'Nom'} =~ /M[ml]/) ? 'F' : 'H'; 25 25 $depute{'Nom'} =~ s/^\s*M\S+\s//; 26 while($t = $p->get_tag(' u', '/div')) {26 while($t = $p->get_tag('span', '/div')) { 27 27 return if ($t->[0] eq '/div'); 28 $txt = $p->get_text('/ u');28 $txt = $p->get_text('/span'); 29 29 $txt =~ /^(\S+)\s*/; 30 30 $e = $1; … … 48 48 sub contact { 49 49 $p = shift; 50 while($p->get_tag(' u', '/div')) {50 while($p->get_tag('span', '/div')) { 51 51 last if ($t->[0] =~ /^\//); 52 $_ = $p->get_text('/ u');52 $_ = $p->get_text('/span'); 53 53 if (/Mél/) { 54 54 $_ = $p->get_text('/li'); … … 83 83 sub mandat { 84 84 $p = shift; 85 while ($t = $p->get_tag(' u', '/div')) {85 while ($t = $p->get_tag('span', '/div')) { 86 86 last if ($t->[0] =~ /^\//); 87 $_ = $p->get_text('/ u');87 $_ = $p->get_text('/span'); 88 88 if (/Mandat|Commission|Mission/) { 89 89 $text = $p->get_text('ul'); … … 151 151 } 152 152 153 while($t = $p->get_tag("h 1", "img")) {153 while($t = $p->get_tag("h2", "img")) { 154 154 if ($t->[0] eq 'img') { 155 155 if (! $depute{'photo'} && $t->[1]{'src'} =~ /photo/) { … … 162 162 next; 163 163 } 164 $_ = $p->get_text('/h 1');164 $_ = $p->get_text('/h2'); 165 165 if (/Informations générales/) { 166 166 infosgene($p);
Note: See TracChangeset
for help on using the changeset viewer.