示例#1
0
  def _get_cmd(self, args):
    self.args = args
    cmd = [YTDL_PATH, "--no-part", "--no-continue", "--no-playlist", 
           "--max-downloads", "1", "--no-progress", "--output", OUT_FILE]

    if ythelper.skip_download(self.url):
      cmd.append("--simulate")
      cmd.append("--dump-single-json")

    fmat = ythelper.get_format(self.url)
    if fmat is not None:
      cmd.append("--format")
      cmd.append(fmat)

    cmd.append(self.url)
    return cmd
示例#2
0
  def _get_cmd(self, args):
    self.args = args
    cmd = [YTDL_PATH, "--no-part", "--no-continue", "--no-playlist", 
           "--max-downloads", "1", "--no-progress", "--output", OUT_FILE]

    if ythelper.skip_download(self.url):
      cmd.append("--simulate")
      cmd.append("--dump-single-json")

    cmd.append("--format")
    fmat = ythelper.get_format(self.url)
    if fmat is not None:
      cmd.append(fmat)
    else:
      cmd.append("best")
    cmd.append(self.url)
    return cmd