How to save an image locally using Python whose URL address I already know?

问题:

I know the URL of an image on Internet.我知道 Internet 上图像的 URL。

eg http://www.digimouth.com/news/media/2011/09/google-logo.jpg , which contains the logo of Google.例如http://www.digimouth.com/news/media/2011/09/google-logo.jpg ,其中包含 Google 的徽标。

Now, how can I download this image using Python without actually opening the URL in a browser and saving the file manually.现在,如何使用 Python 下载此图像,而无需实际在浏览器中打开 URL 并手动保存文件。


解决方案:

参考一: https://en.stackoom.com/question/Yleq
参考二: https://stackoom.com/question/Yleq
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章