mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-03-02 19:16:19 +03:00
8 lines
285 B
Python
8 lines
285 B
Python
|
import sys, os, urllib.parse, urllib.request
|
||
|
name = urllib.parse.urlsplit(sys.argv[1])[2].split('/')[-1]
|
||
|
if not os.path.exists(name):
|
||
|
print("Fetching", sys.argv[1])
|
||
|
content = urllib.request.urlopen(sys.argv[1]).read()
|
||
|
with open(name, 'wb') as fd:
|
||
|
fd.write(content)
|