Skip to content

Instantly share code, notes, and snippets.

@ntkog
Last active December 28, 2019 13:16
Show Gist options
  • Save ntkog/a336a1dbaded3be1ad87afbc8b67a822 to your computer and use it in GitHub Desktop.
Save ntkog/a336a1dbaded3be1ad87afbc8b67a822 to your computer and use it in GitHub Desktop.
One-Liner para bajarse todos los episodios del podcast "Más platón y menos whatsapp"
parallel --dry-run --colsep '#' curl "{1}" -o {2}.mp3 :::: <(curl -sS "https://fapi-top.prisasd.com/podcast/playser/1_playser/itunes/la_ventana_mas_platon_y_menos_whatsapp/audios.xml" | xml2js | fx '.rss.channel.item.map(({title,enclosure,...rest}) => ({ title : /[|-]/.test(title) ? title.split(/[|-]/)[1].trim() : title, url : enclosure["@_url"]})).map(({title,url}) => ({ title : title.replace(/(&#039;|"|&quot;)/g, ""), url : url}))' | jq -r '.[] | (.url) + "#" + (.title)')
@ntkog
Copy link
Author

ntkog commented Dec 28, 2019

La versión anterior tenía un bug, por tener un separador inadecuado . Poniendo "#" como separador , ahora si se baja los 45 episodios (hasta la fecha).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment