Compare commits
4 Commits
9ac5ed04e8
...
31b32f2151
Author | SHA1 | Date |
---|---|---|
fenix-soft | 31b32f2151 | |
fenix-soft | 63999f52d7 | |
fenix-soft | 0cc4830679 | |
fenix-soft | 17e55b4817 |
|
@ -1,3 +1,7 @@
|
||||||
|
# V2.0 alpha debug-mode
|
||||||
|
- fix script for use new api rai
|
||||||
|
- fix script for use new rai url, rewrite some code gr1,gr2,gr3
|
||||||
|
|
||||||
# V1.7
|
# V1.7
|
||||||
- add script grr: Umbria, Valle d'Aosta
|
- add script grr: Umbria, Valle d'Aosta
|
||||||
- add italian map "regioni_italia.png" in data directory for future use.
|
- add italian map "regioni_italia.png" in data directory for future use.
|
||||||
|
|
36
gr1
36
gr1
|
@ -4,65 +4,69 @@
|
||||||
####################################################################################
|
####################################################################################
|
||||||
# script che recupera l'ultimo podcast del gr1
|
# script che recupera l'ultimo podcast del gr1
|
||||||
#
|
#
|
||||||
#v:1.0 Novembre 2020
|
# V:2.0 alpha_debug_mode 18 DICEMBRE 2021
|
||||||
#
|
|
||||||
# dipendenze: curl,jq,cat,wget,ffmpeg
|
|
||||||
#
|
#
|
||||||
|
# dipendenze: curl,jq,cat,wget
|
||||||
#
|
#
|
||||||
|
# log: modifiche per cambio api e dominio rai
|
||||||
####################################################################################
|
####################################################################################
|
||||||
|
|
||||||
# set global variable
|
# set global variable
|
||||||
|
|
||||||
gr1api="https://www.raiplayradio.it/programmi/gr1/?json"
|
gr1api="https://www.raiplaysound.it/programmi/gr1.json"
|
||||||
grbase="https://www.raiplayradio.it"
|
grbase="https://www.raiplaysound.it"
|
||||||
ag="Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Firefox/56.0"
|
ag="Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Firefox/56.0"
|
||||||
|
|
||||||
|
|
||||||
# remove old jason data
|
# remove old jason data
|
||||||
rm ./data/gr1.json
|
rm ./data/gr1.json
|
||||||
rm ./data/Lgr1.json
|
#rm ./data/Lgr1.json
|
||||||
|
|
||||||
|
|
||||||
# get jason data
|
# get jason data
|
||||||
curl -A "$ag" "$gr1api" -o data/gr1.json
|
curl -A "$ag" "$gr1api" -o data/gr1.json
|
||||||
echo " "
|
echo " "
|
||||||
|
echo " "
|
||||||
echo "get data api... done!"
|
echo "get data api... done!"
|
||||||
echo " "
|
echo " "
|
||||||
|
|
||||||
|
|
||||||
# extract jason data of the last podcast
|
# extract jason data of the last podcast
|
||||||
|
|
||||||
dataL=`cat ./data/gr1.json | jq -r ."pathFirstItem"`
|
dataT=`cat ./data/gr1.json | jq -r '."block" | ."cards" | .[0] | ."downloadable_audio" | ."title"'`
|
||||||
|
|
||||||
echo " "
|
echo " "
|
||||||
echo log: $dataL
|
echo "extract data... find.."
|
||||||
|
echo " "
|
||||||
|
echo " "
|
||||||
|
echo podcast_title: $dataT
|
||||||
echo " "
|
echo " "
|
||||||
|
|
||||||
curl -A "$ag" "$grbase$dataL" -o data/Lgr1.json
|
|
||||||
|
|
||||||
Lpodcast=`cat ./data/Lgr1.json | jq -r '.["audio"] | .contentUrl'`
|
|
||||||
|
Lpodcast=`cat ./data/gr1.json | jq -r '."block" | ."cards" | .[0] | ."downloadable_audio" | ."url"'`
|
||||||
|
|
||||||
echo " "
|
echo " "
|
||||||
echo log: $Lpodcast
|
echo podcast_url: $Lpodcast
|
||||||
echo " "
|
echo " "
|
||||||
|
|
||||||
|
|
||||||
# extract time and date onair podcast
|
# extract time and date onair podcast
|
||||||
|
|
||||||
ora=`cat ./data/Lgr1.json | jq -r ."timePublished"`
|
ora=`cat ./data/gr1.json | jq -r '."block" | ."cards" | .[0] | ."create_time"'`
|
||||||
Ora=`echo $ora | sed -e 's/\ /\n/g' | grep ":"| sed -e 's/\:/\_/g'`
|
Ora=`echo $ora | sed -e 's/\ /\n/g' | grep ":"| sed -e 's/\:/\_/g'`
|
||||||
|
|
||||||
data=`cat ./data/Lgr1.json | jq -r ."datePublished"`
|
data=`cat ./data/gr1.json | jq -r '."block" | ."cards" | .[0] | ."create_date"'`
|
||||||
Data=`echo $data | sed -e 's/\//\-/g'`
|
Data=`echo $data | sed -e 's/\//\-/g'`
|
||||||
|
|
||||||
echo " "
|
echo " "
|
||||||
echo log: $Data $Ora
|
echo log_podcast_creation: $Data $Ora
|
||||||
echo " "
|
echo " "
|
||||||
echo " "
|
echo " "
|
||||||
|
|
||||||
|
|
||||||
# download podcast
|
# download podcast
|
||||||
|
echo " download podcast.. opus_encode.."
|
||||||
|
echo " "
|
||||||
wget -d -c -U "$ag" "$Lpodcast" -O gr1_"$Data"_"$Ora".mp3
|
wget -d -c -U "$ag" "$Lpodcast" -O gr1_"$Data"_"$Ora".mp3
|
||||||
|
|
||||||
# encode audio data... small file
|
# encode audio data... small file
|
||||||
|
|
36
gr2
36
gr2
|
@ -4,65 +4,69 @@
|
||||||
####################################################################################
|
####################################################################################
|
||||||
# script che recupera l'ultimo podcast del gr2
|
# script che recupera l'ultimo podcast del gr2
|
||||||
#
|
#
|
||||||
#v:1.0 Novembre 2020
|
#V:2.0 alpha_debug_mode 18 DICEMBRE 2021
|
||||||
#
|
|
||||||
# dipendenze: curl,jq,cat,wget,ffmpeg
|
|
||||||
#
|
#
|
||||||
|
# dipendenze: curl,jq,cat,wget
|
||||||
#
|
#
|
||||||
|
# log: cambio api rai e dominio
|
||||||
####################################################################################
|
####################################################################################
|
||||||
|
|
||||||
# set global variable
|
# set global variable
|
||||||
|
|
||||||
gr2api="https://www.raiplayradio.it/programmi/gr2/?json"
|
gr2api="https://www.raiplaysound.it/programmi/gr2.json"
|
||||||
grbase="https://www.raiplayradio.it"
|
grbase="https://www.raiplaysound.it"
|
||||||
ag="Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Firefox/56.0"
|
ag="Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Firefox/56.0"
|
||||||
|
|
||||||
|
|
||||||
# remove old jason data
|
# remove old jason data
|
||||||
rm ./data/gr2.json
|
rm ./data/gr2.json
|
||||||
rm ./data/Lgr2.json
|
#rm ./data/Lgr2.json
|
||||||
|
|
||||||
|
|
||||||
# get jason data
|
# get jason data
|
||||||
curl -A "$ag" "$gr2api" -o data/gr2.json
|
curl -A "$ag" "$gr2api" -o data/gr2.json
|
||||||
echo " "
|
echo " "
|
||||||
|
echo " "
|
||||||
echo "get data api... done!"
|
echo "get data api... done!"
|
||||||
echo " "
|
echo " "
|
||||||
|
|
||||||
|
|
||||||
# extract jason data of the last podcast
|
# extract jason data of the last podcast
|
||||||
|
|
||||||
dataL=`cat ./data/gr2.json | jq -r ."pathFirstItem"`
|
dataT=`cat ./data/gr2.json | jq -r '."block" | ."cards" | .[0] | ."downloadable_audio" | ."title"'`
|
||||||
|
|
||||||
echo " "
|
echo " "
|
||||||
echo log: $dataL
|
echo "extract data... find.."
|
||||||
|
echo " "
|
||||||
|
echo " "
|
||||||
|
echo podcast_title: $dataT
|
||||||
echo " "
|
echo " "
|
||||||
|
|
||||||
curl -A "$ag" "$grbase$dataL" -o data/Lgr2.json
|
|
||||||
|
|
||||||
Lpodcast=`cat ./data/Lgr2.json | jq -r '.["audio"] | .contentUrl'`
|
|
||||||
|
Lpodcast=`cat ./data/gr2.json | jq -r '."block" | ."cards" | .[0] | ."downloadable_audio" | ."url"'`
|
||||||
|
|
||||||
echo " "
|
echo " "
|
||||||
echo log: $Lpodcast
|
echo podcast_url: $Lpodcast
|
||||||
echo " "
|
echo " "
|
||||||
|
|
||||||
|
|
||||||
# extract time and date onair podcast
|
# extract time and date onair podcast
|
||||||
|
|
||||||
ora=`cat ./data/Lgr2.json | jq -r ."timePublished"`
|
ora=`cat ./data/gr2.json | jq -r '."block" | ."cards" | .[0] | ."create_time"'`
|
||||||
Ora=`echo $ora | sed -e 's/\ /\n/g' | grep ":"| sed -e 's/\:/\_/g'`
|
Ora=`echo $ora | sed -e 's/\ /\n/g' | grep ":"| sed -e 's/\:/\_/g'`
|
||||||
|
|
||||||
data=`cat ./data/Lgr2.json | jq -r ."datePublished"`
|
data=`cat ./data/gr2.json | jq -r '."block" | ."cards" | .[0] | ."create_date"'`
|
||||||
Data=`echo $data | sed -e 's/\//\-/g'`
|
Data=`echo $data | sed -e 's/\//\-/g'`
|
||||||
|
|
||||||
echo " "
|
echo " "
|
||||||
echo log: $Data $Ora
|
echo log_podcast_creation: $Data $Ora
|
||||||
echo " "
|
echo " "
|
||||||
echo " "
|
echo " "
|
||||||
|
|
||||||
|
|
||||||
# download podcast
|
# download podcast
|
||||||
|
echo " download podcast.. opus_encode.."
|
||||||
|
echo " "
|
||||||
wget -d -c -U "$ag" "$Lpodcast" -O gr2_"$Data"_"$Ora".mp3
|
wget -d -c -U "$ag" "$Lpodcast" -O gr2_"$Data"_"$Ora".mp3
|
||||||
|
|
||||||
# encode audio data... small file
|
# encode audio data... small file
|
||||||
|
|
36
gr3
36
gr3
|
@ -4,65 +4,69 @@
|
||||||
####################################################################################
|
####################################################################################
|
||||||
# script che recupera l'ultimo podcast del gr3
|
# script che recupera l'ultimo podcast del gr3
|
||||||
#
|
#
|
||||||
#v:1.0 Novembre 2020
|
#V:2.0 alpha_debug_mode 18 DICEMBRE 2021
|
||||||
#
|
|
||||||
# dipendenze: curl,jq,cat,wget,ffmpeg
|
|
||||||
#
|
#
|
||||||
|
# dipendenze: curl,jq,cat,wget
|
||||||
#
|
#
|
||||||
|
# log: cambio api rai e dominio
|
||||||
####################################################################################
|
####################################################################################
|
||||||
|
|
||||||
# set global variable
|
# set global variable
|
||||||
|
|
||||||
gr3api="https://www.raiplayradio.it/programmi/gr3/?json"
|
gr3api="https://www.raiplaysound.it/programmi/gr3.json"
|
||||||
grbase="https://www.raiplayradio.it"
|
grbase="https://www.raiplaysound.it"
|
||||||
ag="Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Firefox/56.0"
|
ag="Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Firefox/56.0"
|
||||||
|
|
||||||
|
|
||||||
# remove old jason data
|
# remove old jason data
|
||||||
rm ./data/gr3.json
|
rm ./data/gr3.json
|
||||||
rm ./data/Lgr3.json
|
#rm ./data/Lgr3.json
|
||||||
|
|
||||||
|
|
||||||
# get jason data
|
# get jason data
|
||||||
curl -A "$ag" "$gr3api" -o data/gr3.json
|
curl -A "$ag" "$gr3api" -o data/gr3.json
|
||||||
echo " "
|
echo " "
|
||||||
|
echo " "
|
||||||
echo "get data api... done!"
|
echo "get data api... done!"
|
||||||
echo " "
|
echo " "
|
||||||
|
|
||||||
|
|
||||||
# extract jason data of the last podcast
|
# extract jason data of the last podcast
|
||||||
|
|
||||||
dataL=`cat ./data/gr3.json | jq -r ."pathFirstItem"`
|
dataT=`cat ./data/gr3.json | jq -r '."block" | ."cards" | .[0] | ."downloadable_audio" | ."title"'`
|
||||||
|
|
||||||
echo " "
|
echo " "
|
||||||
echo log: $dataL
|
echo "extract data... find.."
|
||||||
|
echo " "
|
||||||
|
echo " "
|
||||||
|
echo podcast_title: $dataT
|
||||||
echo " "
|
echo " "
|
||||||
|
|
||||||
curl -A "$ag" "$grbase$dataL" -o data/Lgr3.json
|
|
||||||
|
|
||||||
Lpodcast=`cat ./data/Lgr3.json | jq -r '.["audio"] | .contentUrl'`
|
|
||||||
|
Lpodcast=`cat ./data/gr3.json | jq -r '."block" | ."cards" | .[0] | ."downloadable_audio" | ."url"'`
|
||||||
|
|
||||||
echo " "
|
echo " "
|
||||||
echo log: $Lpodcast
|
echo podcast_url: $Lpodcast
|
||||||
echo " "
|
echo " "
|
||||||
|
|
||||||
|
|
||||||
# extract time and date onair podcast
|
# extract time and date onair podcast
|
||||||
|
|
||||||
ora=`cat ./data/Lgr3.json | jq -r ."timePublished"`
|
ora=`cat ./data/gr3.json | jq -r '."block" | ."cards" | .[0] | ."create_time"'`
|
||||||
Ora=`echo $ora | sed -e 's/\ /\n/g' | grep ":"| sed -e 's/\:/\_/g'`
|
Ora=`echo $ora | sed -e 's/\ /\n/g' | grep ":"| sed -e 's/\:/\_/g'`
|
||||||
|
|
||||||
data=`cat ./data/Lgr3.json | jq -r ."datePublished"`
|
data=`cat ./data/gr3.json | jq -r '."block" | ."cards" | .[0] | ."create_date"'`
|
||||||
Data=`echo $data | sed -e 's/\//\-/g'`
|
Data=`echo $data | sed -e 's/\//\-/g'`
|
||||||
|
|
||||||
echo " "
|
echo " "
|
||||||
echo log: $Data $Ora
|
echo log_podcast_creation: $Data $Ora
|
||||||
echo " "
|
echo " "
|
||||||
echo " "
|
echo " "
|
||||||
|
|
||||||
|
|
||||||
# download podcast
|
# download podcast
|
||||||
|
echo " download podcast.. opus_encode.."
|
||||||
|
echo " "
|
||||||
wget -d -c -U "$ag" "$Lpodcast" -O gr3_"$Data"_"$Ora".mp3
|
wget -d -c -U "$ag" "$Lpodcast" -O gr3_"$Data"_"$Ora".mp3
|
||||||
|
|
||||||
# encode audio data... small file
|
# encode audio data... small file
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
V1.7
|
V2.0
|
||||||
|
|
Loading…
Reference in New Issue