Skip to content

Instantly share code, notes, and snippets.

@aVolpe
Created March 7, 2019 23:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aVolpe/3edb786c0e428b75dda5b74c69cbabb1 to your computer and use it in GitHub Desktop.
Save aVolpe/3edb786c0e428b75dda5b74c69cbabb1 to your computer and use it in GitHub Desktop.
Scrap IPS db by 'Cédula'
#!/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