Created
April 29, 2020 19:13
-
-
Save adjmedina/5e7fc09783711e688728194db09200c6 to your computer and use it in GitHub Desktop.
Código para bajar libros Conaliteg
This file contains 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
#Codigo para copiar libros de la web | |
import requests | |
iden = 1 | |
url = "" | |
archivo = "" | |
for iden in xrange(1,279): | |
#pass | |
url = "http://libros.conaliteg.gob.mx/javax.faces.resource/dynamiccontent.properties.jsf?ln=primefaces&pfdrid=cBtz4OR0S0m0aSKaAgecJYTJxe9DKt6hnSXrf%2B71DpA%3D&idLibro=177&orden=" + str(iden) + "&pfdrid_c=true" | |
r = requests.get(url) | |
print url | |
print r.status_code | |
archivo = "libro" + str(iden) + ".jpg" | |
fo = open(archivo, "wb") | |
fo.write(r.content); | |
fo.close() | |
#print r.status_code | |
#print r.headers | |
#print r.content | |
# Abrimos el archivo codehero.txt | |
# Cerramos el archivo codehero.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment