parameters: (url: str, file: str = '')
docstring: Given a `we.tl/' or `wetransfer.com/downloads/' download it.
  
      First a direct link is retrieved (via download_url()), the filename can be
      provided via the optional `file' argument. If not provided the filename
      will be extracted to it and it will be fetched and stored on the current
      working directory.
docstring_summary: Given a `we.tl/' or `wetransfer.com/downloads/' download it.
docstring_tokens: Given a we . tl / or wetransfer . com / downloads / download it .
function: def download(url: str, file: str = '') -> None:
      """Given a `we.tl/' or `wetransfer.com/downloads/' download it.
  
      First a direct link is retrieved (via download_url()), the filename can be
      provided via the optional `file' argument. If not provided the filename
      will be extracted to it and it will be fetched and stored on the current
      working directory.
      """
      dl_url = download_url(url)
      if not file:
          file = _file_unquote(urllib.parse.urlparse(dl_url).path.split('/')[-1])
  
      r = requests.get(dl_url, stream=True)
      with open(file, 'wb') as f:
          for chunk in r.iter_content(chunk_size=1024):
              f.write(chunk)
function_tokens: def download ( url : str , file : str = '' ) -> None : dl_url = download_url ( url ) if not file : file = _file_unquote ( urllib . parse . urlparse ( dl_url ) . path . split ( '/' ) [ - 1 ] ) r = requests . get ( dl_url , stream = True ) with open ( file , 'wb' ) as f : for chunk in r . iter_content ( chunk_size = 1024 ) : f . write ( chunk )