python save image from url

前端 未结 9 1213
滥情空心
滥情空心 2020-12-04 09:41

I got a problem when I am using python to save an image from url either by urllib2 request or urllib.urlretrieve. That is the url of the image is valid. I could download it

9条回答
  •  被撕碎了的回忆
    2020-12-04 10:16

    For linux in case; you can use wget command

    import os
    url1 = 'YOUR_URL_WHATEVER'
    os.system('wget {}'.format(url1))
    

提交回复
热议问题