notsakeeb commited on
Commit
ff7aa08
·
verified ·
1 Parent(s): adf0d1d

Update ToolSet.py

Browse files
Files changed (1) hide show
  1. ToolSet.py +2 -0
ToolSet.py CHANGED
@@ -262,6 +262,7 @@ class YouTubeFrameExtractor:
262
 
263
  def download_video(self, url: str) -> str:
264
  ydl_opts = {
 
265
  'format': 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4',
266
  'outtmpl': '%(id)s.%(ext)s',
267
  }
@@ -332,6 +333,7 @@ class YouTubeTranscriber:
332
  Download only the audio from a YouTube URL and return the local filename.
333
  """
334
  ydl_opts = {
 
335
  "format": "bestaudio/best", # best available audio :contentReference[oaicite:3]{index=3}
336
  "postprocessors": [{
337
  "key": "FFmpegExtractAudio", # extract with FFmpeg :contentReference[oaicite:4]{index=4}
 
262
 
263
  def download_video(self, url: str) -> str:
264
  ydl_opts = {
265
+ "cookies-from-browser": "chrome",
266
  'format': 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4',
267
  'outtmpl': '%(id)s.%(ext)s',
268
  }
 
333
  Download only the audio from a YouTube URL and return the local filename.
334
  """
335
  ydl_opts = {
336
+ "cookies-from-browser": "chrome",
337
  "format": "bestaudio/best", # best available audio :contentReference[oaicite:3]{index=3}
338
  "postprocessors": [{
339
  "key": "FFmpegExtractAudio", # extract with FFmpeg :contentReference[oaicite:4]{index=4}