amitgcode commited on
Commit
5407d1b
·
verified ·
1 Parent(s): 94fc137
Files changed (1) hide show
  1. transcribe_videos.py +6 -1
transcribe_videos.py CHANGED
@@ -98,7 +98,12 @@ def transcribe_and_save(url, output_dir="output"):
98
  """
99
  try:
100
  # Download audio with yt-dlp
101
- with yt_dlp.YoutubeDL({'format': 'bestaudio','cookiefile':'testcookie'}, ) as ydl:
 
 
 
 
 
102
  info = ydl.extract_info(url, download=False)
103
  audio_url = info['url']
104
 
 
98
  """
99
  try:
100
  # Download audio with yt-dlp
101
+ with yt_dlp.YoutubeDL({'format': 'bestaudio',
102
+ #'cookiefile':'testcookie',
103
+ 'extractor_args':{'youtubetab':'skip=webpage',
104
+ 'youtube':'player_skip=webpage,configs;visitor_data=VISITOR_DATA_VALUE_HERE'
105
+ }}, ) as ydl:
106
+ #{'youtube': {'skip': ['dash', 'hls']}
107
  info = ydl.extract_info(url, download=False)
108
  audio_url = info['url']
109