import sys, urllib
def reporthook(*a): print a
for url in sys.argv[1:]:
i = url.rfind('/')
file = url[i+1:]
print url, "->", file
urllib.urlretrieve(url, file, reporthook)
2008/05/27
Python Version of wget
據說是 Guido van Rossum 在 Python Cookbook 的例子。
Subscribe to:
Posts (Atom)