Compare commits
6 Commits
7c379d22f4
...
26587f897f
Author | SHA1 | Date |
---|---|---|
fenix-soft | 26587f897f | |
fenix-soft | 58b639d6ce | |
fenix-soft | ba7ab3c845 | |
fenix-soft | 75491720df | |
fenix-soft | 3d31a7e477 | |
fenix-soft | 356320b3c9 |
|
@ -1,3 +1,9 @@
|
|||
# V1.6
|
||||
- add script grr: Puglia, Sardegna, Sicilia, Toscana, Trentino
|
||||
|
||||
# V1.5
|
||||
- add script grr: Marche, Molise, Veneto
|
||||
|
||||
# V1.4
|
||||
|
||||
- add script grr: Emilia Romamagna, Friuli-VG, Liguria,
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
#
|
||||
####################################################################################
|
||||
# script che recupera i podcast del radio giornale della Puglia
|
||||
#
|
||||
# v:1.0
|
||||
#
|
||||
# dipendenze: curl,jq,cat,wget
|
||||
#
|
||||
#
|
||||
####################################################################################
|
||||
|
||||
|
||||
# set global variable
|
||||
|
||||
grrAPI="https://www.rainews.it/dl/rai24/tgr/basic/archivio/ContentSet-8f966ccb-6364-4645-89be-9f8366e4f57e.json"
|
||||
|
||||
ag="Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Firefox/56.0"
|
||||
|
||||
# remove old jason data
|
||||
rm ./data/Puglia.json
|
||||
|
||||
# get jason data
|
||||
curl -A "$ag" "$grrAPI" -o data/Puglia.json
|
||||
echo " "
|
||||
echo "get data api... done!"
|
||||
echo " "
|
||||
|
||||
# extract jason data of the 2 last podcast stored
|
||||
data0=`cat ./data/Puglia.json | jq -r '.items[0]|.date'`
|
||||
Media0=`cat ./data/Puglia.json | jq -r '.items[0]|.mediaUrl'`
|
||||
ora0=`cat ./data/Puglia.json | jq -r '.items[0]|.title'`
|
||||
|
||||
data1=`cat ./data/Puglia.json | jq -r '.items[1]|.date'`
|
||||
Media1=`cat ./data/Puglia.json | jq -r '.items[1]|.mediaUrl'`
|
||||
ora1=`cat ./data/Puglia.json | jq -r '.items[1]|.title'`
|
||||
|
||||
# extract time onair podcast "h_m"
|
||||
Ora0=`echo $ora0 | sed -e 's/\ /\n/g' | grep ":"| sed -e 's/\:/\_/g'`
|
||||
|
||||
Ora1=`echo $ora1 | sed -e 's/\ /\n/g' | grep ":"| sed -e 's/\:/\_/g'`
|
||||
|
||||
# extract date onair podcast "type 10-10-2020"
|
||||
Data0=`echo $data0 | sed -e 's/\//\-/g'`
|
||||
Data1=`echo $data1 | sed -e 's/\//\-/g'`
|
||||
|
||||
echo " "
|
||||
echo "extract data... done!"
|
||||
echo " "
|
||||
|
||||
# download podcast
|
||||
|
||||
wget -d -c -U "$ag" "$Media0" -O GRR_Puglia_"$Data0"_"$Ora0".mp3
|
||||
wget -d -c -U "$ag" "$Media1" -O GRR_Puglia_"$Data1"_"$Ora1".mp3
|
|
@ -0,0 +1,55 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
#
|
||||
####################################################################################
|
||||
# script che recupera i podcast del radio giornale della Sardegna
|
||||
#
|
||||
# v:1.0
|
||||
#
|
||||
# dipendenze: curl,jq,cat,wget
|
||||
#
|
||||
#
|
||||
####################################################################################
|
||||
|
||||
|
||||
# set global variable
|
||||
|
||||
grrAPI="https://www.rainews.it/dl/rai24/tgr/basic/archivio/ContentSet-49e9a5dc-a10a-47ee-bb5c-42c3879c2e71.json"
|
||||
|
||||
ag="Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Firefox/56.0"
|
||||
|
||||
# remove old jason data
|
||||
rm ./data/Sardegna.json
|
||||
|
||||
# get jason data
|
||||
curl -A "$ag" "$grrAPI" -o data/Sardegna.json
|
||||
echo " "
|
||||
echo "get data api... done!"
|
||||
echo " "
|
||||
|
||||
# extract jason data of the 2 last podcast stored
|
||||
data0=`cat ./data/Sardegna.json | jq -r '.items[0]|.date'`
|
||||
Media0=`cat ./data/Sardegna.json | jq -r '.items[0]|.mediaUrl'`
|
||||
ora0=`cat ./data/Sardegna.json | jq -r '.items[0]|.title'`
|
||||
|
||||
data1=`cat ./data/Sardegna.json | jq -r '.items[1]|.date'`
|
||||
Media1=`cat ./data/Sardegna.json | jq -r '.items[1]|.mediaUrl'`
|
||||
ora1=`cat ./data/Sardegna.json | jq -r '.items[1]|.title'`
|
||||
|
||||
# extract time onair podcast "h_m"
|
||||
Ora0=`echo $ora0 | sed -e 's/\ /\n/g' | grep ":"| sed -e 's/\:/\_/g'`
|
||||
|
||||
Ora1=`echo $ora1 | sed -e 's/\ /\n/g' | grep ":"| sed -e 's/\:/\_/g'`
|
||||
|
||||
# extract date onair podcast "type 10-10-2020"
|
||||
Data0=`echo $data0 | sed -e 's/\//\-/g'`
|
||||
Data1=`echo $data1 | sed -e 's/\//\-/g'`
|
||||
|
||||
echo " "
|
||||
echo "extract data... done!"
|
||||
echo " "
|
||||
|
||||
# download podcast
|
||||
|
||||
wget -d -c -U "$ag" "$Media0" -O GRR_Sardegna_"$Data0"_"$Ora0".mp3
|
||||
wget -d -c -U "$ag" "$Media1" -O GRR_Sardegna_"$Data1"_"$Ora1".mp3
|
|
@ -0,0 +1,55 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
#
|
||||
####################################################################################
|
||||
# script che recupera i podcast del radio giornale della Sicilia
|
||||
#
|
||||
# v:1.0
|
||||
#
|
||||
# dipendenze: curl,jq,cat,wget
|
||||
#
|
||||
#
|
||||
####################################################################################
|
||||
|
||||
|
||||
# set global variable
|
||||
|
||||
grrAPI="https://www.rainews.it/dl/rai24/tgr/basic/archivio/ContentSet-2b25138f-e9ea-4fe7-a6d8-69d10fb446bc.json"
|
||||
|
||||
ag="Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Firefox/56.0"
|
||||
|
||||
# remove old jason data
|
||||
rm ./data/Sicilia.json
|
||||
|
||||
# get jason data
|
||||
curl -A "$ag" "$grrAPI" -o data/Sicilia.json
|
||||
echo " "
|
||||
echo "get data api... done!"
|
||||
echo " "
|
||||
|
||||
# extract jason data of the 2 last podcast stored
|
||||
data0=`cat ./data/Sicilia.json | jq -r '.items[0]|.date'`
|
||||
Media0=`cat ./data/Sicilia.json | jq -r '.items[0]|.mediaUrl'`
|
||||
ora0=`cat ./data/Sicilia.json | jq -r '.items[0]|.title'`
|
||||
|
||||
data1=`cat ./data/Sicilia.json | jq -r '.items[1]|.date'`
|
||||
Media1=`cat ./data/Sicilia.json | jq -r '.items[1]|.mediaUrl'`
|
||||
ora1=`cat ./data/Sicilia.json | jq -r '.items[1]|.title'`
|
||||
|
||||
# extract time onair podcast "h_m"
|
||||
Ora0=`echo $ora0 | sed -e 's/\ /\n/g' | grep ":"| sed -e 's/\:/\_/g'`
|
||||
|
||||
Ora1=`echo $ora1 | sed -e 's/\ /\n/g' | grep ":"| sed -e 's/\:/\_/g'`
|
||||
|
||||
# extract date onair podcast "type 10-10-2020"
|
||||
Data0=`echo $data0 | sed -e 's/\//\-/g'`
|
||||
Data1=`echo $data1 | sed -e 's/\//\-/g'`
|
||||
|
||||
echo " "
|
||||
echo "extract data... done!"
|
||||
echo " "
|
||||
|
||||
# download podcast
|
||||
|
||||
wget -d -c -U "$ag" "$Media0" -O GRR_Sicilia_"$Data0"_"$Ora0".mp3
|
||||
wget -d -c -U "$ag" "$Media1" -O GRR_Sicilia_"$Data1"_"$Ora1".mp3
|
|
@ -0,0 +1,55 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
#
|
||||
####################################################################################
|
||||
# script che recupera i podcast del radio giornale della Toscana
|
||||
#
|
||||
# v:1.0
|
||||
#
|
||||
# dipendenze: curl,jq,cat,wget
|
||||
#
|
||||
#
|
||||
####################################################################################
|
||||
|
||||
|
||||
# set global variable
|
||||
|
||||
grrAPI="https://www.rainews.it/dl/rai24/tgr/basic/archivio/ContentSet-4139dec9-a0e5-451d-a352-693e09563230.json".json"
|
||||
|
||||
ag="Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Firefox/56.0"
|
||||
|
||||
# remove old jason data
|
||||
rm ./data/Toscana.json
|
||||
|
||||
# get jason data
|
||||
curl -A "$ag" "$grrAPI" -o data/Toscana.json
|
||||
echo " "
|
||||
echo "get data api... done!"
|
||||
echo " "
|
||||
|
||||
# extract jason data of the 2 last podcast stored
|
||||
data0=`cat ./data/Toscana.json | jq -r '.items[0]|.date'`
|
||||
Media0=`cat ./data/Toscana.json | jq -r '.items[0]|.mediaUrl'`
|
||||
ora0=`cat ./data/Toscana.json | jq -r '.items[0]|.title'`
|
||||
|
||||
data1=`cat ./data/Toscana.json | jq -r '.items[1]|.date'`
|
||||
Media1=`cat ./data/Toscana.json | jq -r '.items[1]|.mediaUrl'`
|
||||
ora1=`cat ./data/Toscana.json | jq -r '.items[1]|.title'`
|
||||
|
||||
# extract time onair podcast "h_m"
|
||||
Ora0=`echo $ora0 | sed -e 's/\ /\n/g' | grep ":"| sed -e 's/\:/\_/g'`
|
||||
|
||||
Ora1=`echo $ora1 | sed -e 's/\ /\n/g' | grep ":"| sed -e 's/\:/\_/g'`
|
||||
|
||||
# extract date onair podcast "type 10-10-2020"
|
||||
Data0=`echo $data0 | sed -e 's/\//\-/g'`
|
||||
Data1=`echo $data1 | sed -e 's/\//\-/g'`
|
||||
|
||||
echo " "
|
||||
echo "extract data... done!"
|
||||
echo " "
|
||||
|
||||
# download podcast
|
||||
|
||||
wget -d -c -U "$ag" "$Media0" -O GRR_Toscana_"$Data0"_"$Ora0".mp3
|
||||
wget -d -c -U "$ag" "$Media1" -O GRR_Toscana_"$Data1"_"$Ora1".mp3
|
|
@ -0,0 +1,55 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
#
|
||||
####################################################################################
|
||||
# script che recupera i podcast del radio giornale del Trentino
|
||||
#
|
||||
# v:1.0
|
||||
#
|
||||
# dipendenze: curl,jq,cat,wget
|
||||
#
|
||||
#
|
||||
####################################################################################
|
||||
|
||||
|
||||
# set global variable
|
||||
|
||||
grrAPI="https://www.rainews.it/dl/rai24/tgr/basic/archivio/ContentSet-bfbb8872-97e3-4caa-b98c-1ae975165547.json"
|
||||
|
||||
ag="Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Firefox/56.0"
|
||||
|
||||
# remove old jason data
|
||||
rm ./data/Trentino.json
|
||||
|
||||
# get jason data
|
||||
curl -A "$ag" "$grrAPI" -o data/Trentino.json
|
||||
echo " "
|
||||
echo "get data api... done!"
|
||||
echo " "
|
||||
|
||||
# extract jason data of the 2 last podcast stored
|
||||
data0=`cat ./data/Trentino.json | jq -r '.items[0]|.date'`
|
||||
Media0=`cat ./data/Trentino.json | jq -r '.items[0]|.mediaUrl'`
|
||||
ora0=`cat ./data/Trentino.json | jq -r '.items[0]|.title'`
|
||||
|
||||
data1=`cat ./data/Trentino.json | jq -r '.items[1]|.date'`
|
||||
Media1=`cat ./data/Trentino.json | jq -r '.items[1]|.mediaUrl'`
|
||||
ora1=`cat ./data/Trentino.json | jq -r '.items[1]|.title'`
|
||||
|
||||
# extract time onair podcast "h_m"
|
||||
Ora0=`echo $ora0 | sed -e 's/\ /\n/g' | grep ":"| sed -e 's/\:/\_/g'`
|
||||
|
||||
Ora1=`echo $ora1 | sed -e 's/\ /\n/g' | grep ":"| sed -e 's/\:/\_/g'`
|
||||
|
||||
# extract date onair podcast "type 10-10-2020"
|
||||
Data0=`echo $data0 | sed -e 's/\//\-/g'`
|
||||
Data1=`echo $data1 | sed -e 's/\//\-/g'`
|
||||
|
||||
echo " "
|
||||
echo "extract data... done!"
|
||||
echo " "
|
||||
|
||||
# download podcast
|
||||
|
||||
wget -d -c -U "$ag" "$Media0" -O GRR_Trentino_"$Data0"_"$Ora0".mp3
|
||||
wget -d -c -U "$ag" "$Media1" -O GRR_Trentino_"$Data1"_"$Ora1".mp3
|
|
@ -1 +1 @@
|
|||
1.4
|
||||
V1.6
|
Loading…
Reference in New Issue