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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章