1. Usando el comando Wget del S.O.:
import os
os.system("wget http://www.domain.com/")
2. Usando "urllib" directamente:
import urllib, os
# if you comment out this line, it will download to the directory from which you run the script.
os.chdir('/directory/to/save/the/file/to')
url = 'http://www.mydomain.com/myfile.txt'
urllib.urlretrieve(url)
No hay comentarios:
Publicar un comentario