Ability to determine filename and then download #368
turian
started this conversation in
Ideas / Feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Right now, download will try to determine the filename using
gdown._get_filename_from_response()
and then has good complicated logic for performing the download.However, we want to check if the filename exists BEFORE starting the download, to err if the file already exists and would be overwritten.
Unfortunately, the only workaround we have which is quite hacky is to list the contents of the output path (directory) BEFORE gdown.download() and then, after download, check if the new file already existed in the output path. So it would be nice if there were helper functions which:
a) Creates the request and returns the filename
b) Takes the request and performs the download.
This would also help with bugs #340 and #344
Beta Was this translation helpful? Give feedback.
All reactions