import urllib.request, urllib.parse, urllib.error img = urllib.request.urlopen('http://data.pr4e.org/cover3.jpg') man_a = open('portada.jpg', 'wb') tamano = 0 while True: info = img.read(100000) if len(info) < 1: break tamano = tamano + len(info) man_a.write(info) print(tamano, 'caracteres copiados.') man_a.close()