Last active
December 11, 2018 14:05
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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