Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import requests
def partidoEsValido( id_partido ):
pagina = f"http://www.beisbolcubano.cu/estadisticas/BoxScore?idJuego={id_partido}"
peticion = requests.get(pagina)
if peticion.status_code == 200:
return True
return False
rango_de_partidos = 5500 # Este valor puede cambiarlo al que usted desee.
partidos_validos = []
for id_partido in range(rango_de_partidos):
print(f"Validando partido {id_partido}")
if partidoEsValido(id_partido):
partidos_validos.append(id_partido)
print(partidos_validos)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.