Skip to content

Instantly share code, notes, and snippets.

@kissgyorgy
Created July 29, 2013 08:13
Show Gist options
  • Save kissgyorgy/6102843 to your computer and use it in GitHub Desktop.
Save kissgyorgy/6102843 to your computer and use it in GitHub Desktop.
Python: Get file name from url
# http://stackoverflow.com/a/300533/720077
import urllib2
file_name = urllib2.unquote(url).decode('utf8').split('/')[-1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment