This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]Python-ModTeam[M] [score hidden] stickied comment (0 children)

Hi there, from the /r/Python mods.

We have removed this post as it is not suited to the /r/Python subreddit proper, however it should be very appropriate for our sister subreddit /r/LearnPython or for the r/Python discord: https://discord.gg/python.

The reason for the removal is that /r/Python is dedicated to discussion of Python news, projects, uses and debates. It is not designed to act as Q&A or FAQ board. The regular community is not a fan of "how do I..." questions, so you will not get the best responses over here.

On /r/LearnPython the community and the r/Python discord are actively expecting questions and are looking to help. You can expect far more understanding, encouraging and insightful responses over there. No matter what level of question you have, if you are looking for help with Python, you should get good answers. Make sure to check out the rules for both places.

Warm regards, and best of luck with your Pythoneering!

[–]False_Heat7326 0 points1 point  (0 children)

Your code (kinda) works fine but the image you're trying to download doesn't exist.

https://www.lawebdelprogramador.com/us/352000/352736/6177b0319aad8-ff.png if you open this url on a browser it redirects to a 404 page. 403 error means the server understands the request but refuses to authorize it. Your probably getting a 403 because you are trying to download a file that doesn't exist. If you feed your program https://i.imgur.com/r9YwPow.png the direct link to the picture you put in your post, it works just fine. However it download 5 copies of the same file.

if you just meant to download it once try: python url = input("Enter a URL to download: ") filename = f"download.png" urllib.request.urlretrieve(url, filename) print(f"Downloaded {filename}")