def get_status(url):
return get(url).status_code
base_url = “minha_url”
RANGE = 10000
list_of_links = [f"{base_url}{num}" for num in range(1, RANGE + 1)]
edital = namedtuple(‘Edital’, ‘url status’)
sleep(random.uniform(0.2, 10))
generator comprehension
to_download = (edital(link, get_status(link)) for link in list_of_links)
write csv
Normal demorar para rodar?