Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
zackees committed Jan 23, 2025
1 parent ea0e45a commit d88ad65
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/transcribe_anything/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def get_video_name_from_url(url: str) -> str:
# env["set PYTHONIOENCODING=utf-8"]
env["PYTHONIOENCODING"] = "utf-8"
cp = subprocess.run(
cmd_list,
cmd_str,
check=True,
capture_output=True,
universal_newlines=True,
Expand All @@ -150,8 +150,8 @@ def get_video_name_from_url(url: str) -> str:
return sanitize_filename(line)
log_error("yt-dlp failed to get title, using basename instead.")
return os.path.basename(url)
except subprocess.CalledProcessError:
log_error("yt-dlp failed to get title, using basename instead.")
except subprocess.CalledProcessError as exc:
log_error(f"yt-dlp failed with {exc}, using basename instead\n{exc.stdout}\n{exc.stderr}")
return os.path.basename(url)
except Exception as exc:
log_error(f"yt-dlp failed with {exc}, using basename instead.")
Expand Down

0 comments on commit d88ad65

Please sign in to comment.