How to save an image locally using Python in which we already know the URL address

0 votes

Can anyone explain how to save an image locally using Python in which we already know the URL address?

Jun 26, 2020 in Python by Roshni
• 10,420 points
486 views

1 answer to this question.

0 votes

Hi, @Roshni,

The following code is used to save the image locally from the URL address which you know.:

import urllib.request

urllib.request.urlretrieve("URL", "local-filename.jpg")
answered Jun 26, 2020 by Gitika
• 65,870 points

Related Questions In Python

0 votes
1 answer

How to output the rows which are affected using SQLAlchemy in Python?

Hi, good question. This is actually not ...READ MORE

answered Feb 15, 2019 in Python by Nymeria
• 3,520 points
1,382 views
+2 votes
3 answers

How can I play an audio file in the background using Python?

down voteacceptedFor windows: you could use  winsound.SND_ASYNC to play them ...READ MORE

answered Apr 3, 2018 in Python by charlie_brown
• 7,780 points
8,298 views
0 votes
1 answer
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 1,977 views
0 votes
0 answers
+4 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,810 points
1,512 views
0 votes
1 answer

I want to download a file from the website by web scraping. Can anyone explain how to do this in jupyter lab (python) with an example?

Hey, Web scraping is a technique to automatically ...READ MORE

answered Apr 7, 2020 in Python by Gitika
• 65,870 points
643 views
+1 vote
1 answer

Want to know how to write paragraph on image using pillow python?

Hi, @Shantanu, You can make use of the ...READ MORE

answered Apr 14, 2020 in Python by Gitika
• 65,870 points
949 views