DEV Community

TechShreyash
TechShreyash

Posted on

3 1

How to get exact filename from a url in python ?

I am trying to download a file from a direct download link to a image.

How to get the filename from a url like this
https://unsplash.com/photos/Qcefx5xENeA/download?ixid=MnwxMjA3fDB8MXxzZWFyY2h8MTZ8fGFuaW1lfGVufDB8fHx8MTY1MDE2NjYwOQ&force=true

Top comments (0)

Neon image

Set up a Neon project in seconds and connect from a Python application

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Get started →

👋 Kindness is contagious

Explore a trove of insights in this engaging article, celebrated within our welcoming DEV Community. Developers from every background are invited to join and enhance our shared wisdom.

A genuine "thank you" can truly uplift someone’s day. Feel free to express your gratitude in the comments below!

On DEV, our collective exchange of knowledge lightens the road ahead and strengthens our community bonds. Found something valuable here? A small thank you to the author can make a big difference.

Okay