Nitien commited on
Commit
186392f
·
verified ·
1 Parent(s): 6e8c681

Update customtools.py

Browse files
Files changed (1) hide show
  1. customtools.py +1 -1
customtools.py CHANGED
@@ -72,7 +72,7 @@ def youtube_transcript(url: str) -> str:
72
  print(video_id)
73
  try:
74
  transcript = YouTubeTranscriptApi().fetch(video_id)
75
- text = " ".join([piece.text] for piece in transcript)
76
  return text[:chars]
77
  except Exception as exc:
78
  print(f"Error fetching YouTube transcript: {exc}")
 
72
  print(video_id)
73
  try:
74
  transcript = YouTubeTranscriptApi().fetch(video_id)
75
+ text = "\n".join(piece.text for piece in transcript)
76
  return text[:chars]
77
  except Exception as exc:
78
  print(f"Error fetching YouTube transcript: {exc}")