Skip to content

Commit

Permalink
Make _get_filename_from_response private
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed Feb 1, 2024
1 parent e8c2bbd commit 298f680
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gdown/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def get_url_from_gdrive_confirmation(contents):
return url


def get_filename_from_response(res):
def _get_filename_from_response(res):
content_disposition = urllib.parse.unquote(res.headers["Content-Disposition"])

m = re.search(r"filename\*=UTF-8''(.*)", content_disposition)
Expand Down Expand Up @@ -257,7 +257,7 @@ def download(

filename_from_url = None
if gdrive_file_id and is_gdrive_download_link:
filename_from_url = get_filename_from_response(res)
filename_from_url = _get_filename_from_response(res)
if filename_from_url is None:
filename_from_url = osp.basename(url)

Expand Down

0 comments on commit 298f680

Please sign in to comment.