original_docstring: download file from target url
  
          Arguments:
              target_url {str} -- the url of the file that's needed to be downloaded
              download_dst {str} -- the path of the file the download data will be saved to
              header {dict} -- the header that will be used to download the file
              cookie {dict} -- the cookie will be used to download the file
  
          Returns:
              str -- the path of the downloaded file
          
docstring: 
  
  - the path of the downloaded file
docstring_tokens: - the path of the downloaded file
code: def download(self, target_url: str, download_dst: str, header: dict, cookie: dict) -> str:
          """download file from target url
  
          Arguments:
              target_url {str} -- the url of the file that's needed to be downloaded
              download_dst {str} -- the path of the file the download data will be saved to
              header {dict} -- the header that will be used to download the file
              cookie {dict} -- the cookie will be used to download the file
  
          Returns:
              str -- the path of the downloaded file
          """
          target_url = parse.unquote(target_url)
          dst = os.path.abspath(download_dst)
          self.logger.debug("Downloading: {}".format(target_url))
          r = requests.get(target_url, headers=header, cookies=cookie)
  
          if r.status_code >= 400:
              self.logger.error(
                  "Failed to download: {} | Server responded with code: {}".format(target_url, r.status_code))
              return;
  
          with open(dst, "wb") as f:
              f.write(r.content)
  
          self.logger.debug("Downloaded: {}".format(target_url))
  
          return dst
code_tokens: def download ( self , target_url : str , download_dst : str , header : dict , cookie : dict ) -> str : target_url = parse . unquote ( target_url ) dst = os . path . abspath ( download_dst ) self . logger . debug ( "Downloading: {}" . format ( target_url ) ) r = requests . get ( target_url , headers = header , cookies = cookie ) if r . status_code >= 400 : self . logger . error ( "Failed to download: {} | Server responded with code: {}" . format ( target_url , r . status_code ) ) return ; with open ( dst , "wb" ) as f : f . write ( r . content ) self . logger . debug ( "Downloaded: {}" . format ( target_url ) ) return dst
short_docstring: download file from target url
  Arguments:
  target_url {str} -- the url of the file that's needed to be downloaded
  download_dst {str} -- the path of the file the download data will be saved to
  header {dict} -- the header that will be used to download the file
  cookie {dict} -- the cookie will be used to download the file
short_docstring_tokens: download file from target url Arguments : target_url { str } -- the url of the file that ' s needed to be downloaded download_dst { str } -- the path of the file the download data will be saved to header { dict } -- the header that will be used to download the file cookie { dict } -- the cookie will be used to download the file
comment: """download file from target url
  
          Arguments:
              target_url {str} -- the url of the file that's needed to be downloaded
              download_dst {str} -- the path of the file the download data will be saved to
              header {dict} -- the header that will be used to download the file
              cookie {dict} -- the cookie will be used to download the file
  
          Returns:
              str -- the path of the downloaded file
          """