...
|
...
|
@@ -43,15 +43,15 @@ fi
|
43
|
43
|
|
44
|
44
|
echo -n 'scrutin;date;titre;adoption;' > "$result"
|
45
|
45
|
for typevote in $typevotes; do
|
46
|
|
- for groupe in "$cible" $groupe_ref; do
|
47
|
|
- echo -n "$typevote - ${groupe};" >> "$result"
|
|
46
|
+ for g in "$cible" $groupe_ref; do
|
|
47
|
+ echo -n "$typevote - $g;" >> "$result"
|
48
|
48
|
done
|
49
|
49
|
done
|
50
|
50
|
echo >> "$result"
|
51
|
51
|
|
52
|
52
|
last=$(wget -qO- 'http://www2.assemblee-nationale.fr/scrutins/liste/(legislature)/15/(type)/TOUS/(idDossier)/TOUS' | sed -rn 's,^.*<td class="denom">(.+)</td>.*$,\1,p' | head -1)
|
53
|
53
|
for scrutin in $(seq $last); do
|
54
|
|
- wget -qO- $tempfile "http://www2.assemblee-nationale.fr/scrutins/detail/(legislature)/15/(num)/$scrutin" > $tempfile
|
|
54
|
+ wget -qO- "http://www2.assemblee-nationale.fr/scrutins/detail/(legislature)/15/(num)/$scrutin" > $tempfile
|
55
|
55
|
|
56
|
56
|
title=$(sed -rn '/Analyse du scrutin n° '$scrutin'/n; s,^.*<h3 class="president-title">(.+).</h3>,\1,p' $tempfile | sed 's/;//g; s/[ \t][ \t]+/ /g')
|
57
|
57
|
date=$(sed -rn 's,^.*<h1 class="">Analyse du scrutin n° '$scrutin'<br/>(.+) </h1>,\1,p' $tempfile)
|
...
|
...
|
@@ -67,6 +67,6 @@ for scrutin in $(seq $last); do
|
67
|
67
|
echo -n "${ref_votes[$typevote]};" >> "$result"
|
68
|
68
|
done
|
69
|
69
|
echo >> "$result"
|
70
|
|
-
|
71
|
|
- rm $tempfile
|
72
|
70
|
done
|
|
71
|
+
|
|
72
|
+rm $tempfile
|