def dropbox_basename(url):
    filename = os.path.basename(url)
    match = re.findall('\\?dl=[0-9]$', filename)
    if match:
        return filename[:(- len(match[0]))]
    return filename
def dropbox_basename(url):
    filename = os.path.basename(url)
    match = re.findall('\\?dl=[0-9]$', filename)
    if match:
        return filename[:(- len(match[0]))]
    return filename