Created
March 7, 2019 23:34
-
-
Save aVolpe/3edb786c0e428b75dda5b74c69cbabb1 to your computer and use it in GitHub Desktop.
Scrap IPS db by 'Cédula'
This file contains hidden or 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
#!/bin/bash | |
# Usage: | |
# | |
# bash scrap.bash 100000 200000 | |
START=$1 | |
END=$2 | |
for ((i=START;i<=END;i++)); do | |
HOUR=`date +"%H"` | |
mkdir -p "$HOUR" | |
curl 'http://servicios.ips.gov.py/consulta_asegurado/comprobacion_de_derecho_externo.php' --data "nro_cic=$i&recuperar=Recuperar&envio=ok" > $HOUR/$i.html 2>&1 & | |
echo "Document $i" | |
sleep 0.1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment