code: def __download(self, url):
          
          local_filename = urllib.parse.quote_plus(url)
          local_filepath = os.path.join(self.__local_download_dir_warc, local_filename)
  
          if os.path.isfile(local_filepath) and self.__reuse_previously_downloaded_files:
              self.__logger.info("found local file %s, not downloading again due to configuration", local_filepath)
              return local_filepath
          else:
              # cleanup
              try:
                  os.remove(local_filepath)
              except OSError:
                  pass
  
              # download
              self.__logger.info('downloading %s (local: %s)', url, local_filepath)
              urllib.request.urlretrieve(url, local_filepath, reporthook=self.__on_download_progress_update)
              self.__logger.info('download completed, local file: %s', local_filepath)
              return local_filepath
docs: Download and save a file locally.
          :param url: Where to download from
          :return: File path name of the downloaded file