根据长宽下载一个照片
# _*-coding:utf-8 _*_
import urllib.request
height=input("请输入图片高:")
width=input("请输入图片宽:")
url="http://placekitten.com/g/{0}/{1}".format(height, width)
print(url)
response=urllib.request.urlopen(url)
img=response.read()
#print(img)
with open("catImg.jpg","wb") as f:
f.write(img)