Browse Source

Fixed bad pasword case. Improved help message.

master
Christian P. MOMON 2 years ago
committed by Christian P. MOMON
parent
commit
4af37042fd
  1. 28
      ccfmstat/ccfmstat.sh

28
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
# <strong><a class="row-title" href="https://cause-commune.fm/wp-admin/post.php?post=10518&amp;action=edit" aria-label="« Wikipédia &#8211; chronique « Partager est bon » sur écoles et logiciels libres » (Modifier)">Wikipédia &#8211; chronique « Partager est bon » sur écoles et logiciels libres</a></strong>
# <strong><a class="row-title" href="https://cause-commune.fm/wp-admin/post.php?post=10518&amp;action=edit" aria-label="« Wikipédia &#8211; chronique « Partager est bon » sur écoles et logiciels libres » (Modifier)">Wikipédia &#8211; chronique « Partager est bon » sur écoles et logiciels libres</a></strong>
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]+)\&amp ]] && 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]+)\&amp ]] && id=${BASH_REMATCH[1]}
#echo "TRACE id=$id"
[[ $line =~ aria-label=\".+\"\>(.+)\</a\> ]] && title=${BASH_REMATCH[1]}
#echo "TRACE title=$title"
[[ $line =~ aria-label=\".+\"\>(.+)\</a\> ]] && 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
Loading…
Cancel
Save