extract_filename_from_url (function) ∞
-
extract_filename_from_url
(log, url)[source] ∞ get the filename from a URL.
Will return ‘untitled.html’, if no filename is found.
Key Arguments
url
– the url to extract filename from
- Returns:
filename
– the filename
Usage
from fundamentals.download import extract_filename_from_url name = extract_filename_from_url( log=log, url="https://en.wikipedia.org/wiki/Docstring" ) print name # OUT: Docstring.html