Kackle commited on
Commit
20eed7d
·
verified ·
1 Parent(s): 7c2a9df
Files changed (1) hide show
  1. video_parser.py +4 -3
video_parser.py CHANGED
@@ -12,11 +12,12 @@ class VideoParser:
12
  def download_youtube_video(self, url: str) -> str:
13
  """Download YouTube video and return local path"""
14
  ydl_opts = {
15
- 'format': 'best[height<=720]',
16
  'outtmpl': os.path.join(self.temp_dir, '%(title)s.%(ext)s'),
17
  'quiet': True,
18
- 'cookiesfrombrowser': ('chrome',),
19
- 'extractor_args': {'youtube': {'skip': ['dash', 'hls']}}
 
20
  }
21
 
22
  with yt_dlp.YoutubeDL(ydl_opts) as ydl:
 
12
  def download_youtube_video(self, url: str) -> str:
13
  """Download YouTube video and return local path"""
14
  ydl_opts = {
15
+ 'format': 'worst[height<=480]/worst',
16
  'outtmpl': os.path.join(self.temp_dir, '%(title)s.%(ext)s'),
17
  'quiet': True,
18
+ 'no_warnings': True,
19
+ 'extract_flat': False,
20
+ 'user_agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36'
21
  }
22
 
23
  with yt_dlp.YoutubeDL(ydl_opts) as ydl: