diff --git a/ccfmstat/ccfmstat.sh b/ccfmstat/ccfmstat.sh
index 76f3212..d1ea3ee 100755
--- a/ccfmstat/ccfmstat.sh
+++ b/ccfmstat/ccfmstat.sh
@@ -27,6 +27,7 @@ help()
echo "Usage:"
echo " ccfmstat [ -h | -help | --help ]"
echo "If no parameter set then password is requested."
+ echo "Number of result per page has to be fixed un web GUI page."
}
# ############################################
@@ -112,23 +113,25 @@ run()
idsFile="${tmpPrefix}-listmiens"
curl -s -b "$cookieFile" "$pageUrl" | grep row-title > "$idsFile"
+ if [ $? -eq 0 ]; then
+ # Wikipédia – chronique « Partager est bon » sur écoles et logiciels libres
- # Wikipédia – chronique « Partager est bon » sur écoles et logiciels libres
+ echo -e "id\ttotalListens\ttotalListeners\tiTunes\tpocketcasts\tovercast\tdirectDownload\tplayedInNewWindow\taudioPlayer\tpodcastAddict\tplayerFM\tother\trecordedDate\ttitle"
+ while read line; do
+ #echo $line
+ [[ $line =~ post=([0-9]+)\& ]] && id=${BASH_REMATCH[1]}
+ #echo "TRACE id=$id"
- echo -e "id\ttotalListens\ttotalListeners\tiTunes\tpocketcasts\tovercast\tdirectDownload\tplayedInNewWindow\taudioPlayer\tpodcastAddict\tplayerFM\tother\trecordedDate\ttitle"
-
- while read line; do
- #echo $line
- [[ $line =~ post=([0-9]+)\& ]] && id=${BASH_REMATCH[1]}
- #echo "TRACE id=$id"
-
- [[ $line =~ aria-label=\".+\"\>(.+)\ ]] && title=${BASH_REMATCH[1]}
- #echo "TRACE title=$title"
+ [[ $line =~ aria-label=\".+\"\>(.+)\ ]] && title=${BASH_REMATCH[1]}
+ #echo "TRACE title=$title"
- getInfoFromId "$id" "$title" "$cookieFile"
+ getInfoFromId "$id" "$title" "$cookieFile"
- done < "$idsFile"
+ done < "$idsFile"
+ else
+ echo "Connexion error. Bad password?"
+ fi
}
# ###########################################
@@ -148,7 +151,6 @@ else
# Clean temporary files.
# Clean.
if [ -n "${tmpPrefix}" ]; then
- ls "${tmpPrefix}-"*
rm -f "${tmpPrefix}-"*
fi
fi