Compare commits

..

3 Commits

Author SHA1 Message Date
fenix-soft db5d9e68c6
Add files via upload 2020-11-14 11:09:01 +01:00
fenix-soft e1d28d60c5
Add files via upload 2020-11-14 11:08:21 +01:00
fenix-soft 87eb3ff37a
Add files via upload 2020-11-14 11:07:47 +01:00
3 changed files with 113 additions and 1 deletions

View File

@ -7,7 +7,9 @@
La raccolta prevede al momento, gli script per il: **gr1**, **gr2**, **gr3**
La raccolta prevede al momento, gli script per il: **gr1**, **gr2**, **gr3**, del giornale radio nazionale
La raccolta attualmente prevede, gli scripr del *grr regionale*: **Lazio**, **Lombardia**
## dipendenze:

55
grr_lazio Normal file
View File

@ -0,0 +1,55 @@
#!/bin/bash
#
#
####################################################################################
# script che recupera i podcast del radio giornale del Lazio
#
# v:1.0
#
# dipendenze: curl,jq,cat,wget
#
#
####################################################################################
# set global variable
grrAPI="https://www.rainews.it/dl/rai24/tgr/basic/archivio/ContentSet-cac56e72-5bee-44ef-bb52-c9f590eb82c5.json"
ag="Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Firefox/56.0"
# remove old jason data
rm ./data/Lazio.json
# get jason data
curl -A "$ag" "$grrAPI" -o data/Lazio.json
echo " "
echo "get data api... done!"
echo " "
# extract jason data of the 2 last podcast stored
data0=`cat ./data/Lazio.json | jq -r '.items[0]|.date'`
Media0=`cat ./data/Lazio.json | jq -r '.items[0]|.mediaUrl'`
ora0=`cat ./data/Lazio.json | jq -r '.items[0]|.title'`
data1=`cat ./data/Lazio.json | jq -r '.items[1]|.date'`
Media1=`cat ./data/Lazio.json | jq -r '.items[1]|.mediaUrl'`
ora1=`cat ./data/Lazio.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_Lazio_"$Data0"_"$Ora0".mp3
wget -d -c -U "$ag" "$Media1" -O GRR_Lazio_"$Data1"_"$Ora1".mp3

55
grr_lombardia Normal file
View File

@ -0,0 +1,55 @@
#!/bin/bash
#
#
####################################################################################
# script che recupera i podcast del radio giornale della Lombardia
#
# v:1.0
#
# dipendenze: curl,jq,cat,wget
#
#
####################################################################################
# set global variable
grrAPI="https://www.rainews.it/dl/rai24/tgr/basic/archivio/ContentSet-6cbeca49-b107-49c9-88d2-17a85f376fad.json"
ag="Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Firefox/56.0"
# remove old jason data
rm ./data/Lombardia.json
# get jason data
curl -A "$ag" "$grrAPI" -o data/Lombardia.json
echo " "
echo "get data api... done!"
echo " "
# extract jason data of the 2 last podcast stored
data0=`cat ./data/Lombardia.json | jq -r '.items[0]|.date'`
Media0=`cat ./data/Lombardia.json | jq -r '.items[0]|.mediaUrl'`
ora0=`cat ./data/Lombardia.json | jq -r '.items[0]|.title'`
data1=`cat ./data/Lombardia.json | jq -r '.items[1]|.date'`
Media1=`cat ./data/Lombardia.json | jq -r '.items[1]|.mediaUrl'`
ora1=`cat ./data/Lombardia.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_Lombardia_"$Data0"_"$Ora0".mp3
wget -d -c -U "$ag" "$Media1" -O GRR_Lombardia_"$Data1"_"$Ora1".mp3