get_system_filename

sunpy.util.net.get_system_filename(sock, url, default='file')[source] [edit on github]

Get filename from given urllib2.urlopen object and URL. First, attempts to extract Content-Disposition, second, extract from URL, eventually fall back to default. Returns bytestring in file system encoding.