Artwork

Contenuto fornito da HPR Volunteer and Hacker Public Radio. Tutti i contenuti dei podcast, inclusi episodi, grafica e descrizioni dei podcast, vengono caricati e forniti direttamente da HPR Volunteer and Hacker Public Radio o dal partner della piattaforma podcast. Se ritieni che qualcuno stia utilizzando la tua opera protetta da copyright senza la tua autorizzazione, puoi seguire la procedura descritta qui https://it.player.fm/legal.
Player FM - App Podcast
Vai offline con l'app Player FM !

HPR3962: It's your data

 
Condividi
 

Manage episode 378585646 series 2795599
Contenuto fornito da HPR Volunteer and Hacker Public Radio. Tutti i contenuti dei podcast, inclusi episodi, grafica e descrizioni dei podcast, vengono caricati e forniti direttamente da HPR Volunteer and Hacker Public Radio o dal partner della piattaforma podcast. Se ritieni che qualcuno stia utilizzando la tua opera protetta da copyright senza la tua autorizzazione, puoi seguire la procedura descritta qui https://it.player.fm/legal.

This is a response show to hpr3959 :: Download any HPR series with english file names "A dir with the series name will be created and all shows will be renamed to ShowTitle.mp3 inside it"

This was the first show by gemlog and he used Bash, sed, grep, wget, to scrape the HPR site. This is great but as he points out any change to the site will break the script.

A safer way to get the episodes is by scraping the rss feed, and the following is an example of how you might do that

#!/bin/bash series_url="https://hackerpublicradio.org/hpr_mp3_rss.php?series=42&full=1&gomax=1" download_dir="./" wget "${series_url}" -O - | xmlstarlet sel -T -t -m 'rss/channel/item' -v 'concat(enclosure/@url, "→", title)' -n - | sort | while read episode do url="$( echo ${episode} | awk -F '→' '{print $1}' )" ext="$( basename "${url}" )" title="$( echo ${episode} | awk -F '→' '{print $2}' | sed -e 's/[^A-Za-z0-9]/_/g' )" wget "${url}" -O "${download_dir}/${title}.${ext}" done
  continue reading

63 episodi

Artwork
iconCondividi
 
Manage episode 378585646 series 2795599
Contenuto fornito da HPR Volunteer and Hacker Public Radio. Tutti i contenuti dei podcast, inclusi episodi, grafica e descrizioni dei podcast, vengono caricati e forniti direttamente da HPR Volunteer and Hacker Public Radio o dal partner della piattaforma podcast. Se ritieni che qualcuno stia utilizzando la tua opera protetta da copyright senza la tua autorizzazione, puoi seguire la procedura descritta qui https://it.player.fm/legal.

This is a response show to hpr3959 :: Download any HPR series with english file names "A dir with the series name will be created and all shows will be renamed to ShowTitle.mp3 inside it"

This was the first show by gemlog and he used Bash, sed, grep, wget, to scrape the HPR site. This is great but as he points out any change to the site will break the script.

A safer way to get the episodes is by scraping the rss feed, and the following is an example of how you might do that

#!/bin/bash series_url="https://hackerpublicradio.org/hpr_mp3_rss.php?series=42&full=1&gomax=1" download_dir="./" wget "${series_url}" -O - | xmlstarlet sel -T -t -m 'rss/channel/item' -v 'concat(enclosure/@url, "→", title)' -n - | sort | while read episode do url="$( echo ${episode} | awk -F '→' '{print $1}' )" ext="$( basename "${url}" )" title="$( echo ${episode} | awk -F '→' '{print $2}' | sed -e 's/[^A-Za-z0-9]/_/g' )" wget "${url}" -O "${download_dir}/${title}.${ext}" done
  continue reading

63 episodi

Tutti gli episodi

×
 
Loading …

Benvenuto su Player FM!

Player FM ricerca sul web podcast di alta qualità che tu possa goderti adesso. È la migliore app di podcast e funziona su Android, iPhone e web. Registrati per sincronizzare le iscrizioni su tutti i tuoi dispositivi.

 

Guida rapida