Skip to content

Instantly share code, notes, and snippets.

@spceaza
Last active December 11, 2018 14:05
Show Gist options
  • Save spceaza/b96401c5c8159c746e85124dc8c58f44 to your computer and use it in GitHub Desktop.
Save spceaza/b96401c5c8159c746e85124dc8c58f44 to your computer and use it in GitHub Desktop.
Descarga de documentos Comisión de Regulación de Energía y Gas
wget http://www.creg.gov.co/index.php/es/prensa/presentaciones
grep "\-presentaciones\-" presentaciones > links.txt
sed -i -E -e "s|.*<div class=\"pd-subcategory\" style=\"margin-left:20px; margin-top:20px;\"><a href=\"|http://www.creg.gov.co|" links.txt
sed -i -E -e "s|\" title=\"Presentaciones .*||" links.txt
cat links.txt | xargs wget
grep "PDF" *-presentaciones-* > links.txt
grep "Descargar" *-presentaciones-* >> links.txt
sed -i -E -e "s|.*href=\"|http://www.creg.gov.co|" links.txt
sed -i -E -e "s|\".*|\"|" links.txt
sed -i -E -e "s|http|\"http|" links.txt
cat links.txt | xargs wget
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment