Skip to content

Instantly share code, notes, and snippets.

View AlejandroBlanco2001's full-sized avatar
🎯
Focusing

Isaac Blanco AlejandroBlanco2001

🎯
Focusing
View GitHub Profile
@AlejandroBlanco2001
AlejandroBlanco2001 / sisben_scrapper.py
Last active May 8, 2024 03:52
Python script to extract from the SISBEN status given a list of Cedula numbers (Colombian government ID). Needs an input file in .csv format with the Cedula numbers to run
import subprocess
import csv
from bs4 import BeautifulSoup
def fetch_sisben(cedula: str):
curl_command = [
'curl',
'-k',
'https://reportes.sisben.gov.co/dnp_sisbenconsulta',
'-H', 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',