Ce script tourne sur mon serveur pour afficher les dernières sorties DVD du site Allociné
#!/bin/bash
2 film=false
3 titre=""
4 url='http://www.allocine.fr/dvd/agenda/'
5 out='/var/www/genpashiro.dyndns.org/dvd.html'
6
7 exec 1<> "$out"
8
9 cat <<EOF
10 <!DOCTYPE html>
11 <html lang="fr">
12 <head>
13 <meta charset="utf-8">
14 <title>Agenda des sorties DVD</title>
15 <h3> Sorties DVD de la semaine - <a href="http://www.allocine.fr/dvd/agenda/">Source</a></h3>
16 <style type="text/css">
17 #introduction
18 {
19 font-weight: bold;
20 }
21 body {
22 background-color: #000000;
23 color: #00ff00;
24 font-family: matrix;
25 }
26 a {
27 color: #356e31;
28 text-decoration: none;
29 }
30
31 a:visited
32 {
33 color: #769773;
34 }
35
36 a:hover {
37 color: #ff0000;
38 }
39 </style>
40 </head>
41
42 <body>
43 EOF
44 while read
45 do
46 case "${REPLY}" in
47 *picturezone*)
48 film=true
49 ;;
50 De\ \<a*)
51 auteur=$(IFS='<>' infos=( ${REPLY} ); echo ${infos[2]})
52 ;;
53 Avec\ \<a*)
54 acteurs="$(sed 's/<a[^<]*>//g; s#</a>##g' <<< "${REPLY#Avec }")"
55 ;;
56 *Date\ de\ sortie*)
57 dateSortie="${REPLY#*: }"
58 ;;
59 *)
60 if ${film} && [[ ${REPLY} != *\<*\>* ]]
61 then
62 if [[ ! ${titre} ]]
63 then
64 titre="${REPLY}"
65 elif [[ ! ${typeFilm} ]]
66 then
67 typeFilm="${REPLY}"
68 else
69 cat <<EOF
70 <div id="introduction">${titre}</div>
71 Genre=${typeFilm}<br/>
72 Date Sortie=${dateSortie}<br/>
73 De=${auteur}<br/>
74 Avec=${acteurs}<br/>
75 Résumé=${REPLY}<br/>
76 <br/>
77 EOF
78 film=false
79 titre=""
80 typeFilm=""
81 fi
82 fi
83 ;;
84 esac
85 done < <(wget -qO- "$url")
86 echo '</body></html>'
87
88 exec 1>&-
89
90 true
Depuis quelques jours, l’affichage dans le fichier généré dvd.html est incomplet, voir ici https://genpashiro.dyndns.org/dvd.html
Que peut il se passer??