behnamdowloader commited on
Commit
bc7e119
·
1 Parent(s): ad9be74

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -24,6 +24,9 @@ ydl_opts = {
24
  }
25
  # ydl_opts = { }
26
 
 
 
 
27
  # os.environ['HTTP_PROXY'] = '"http://proxy.server:3128"'
28
  with yt_dlp.YoutubeDL(ydl_opts) as ydl:
29
  ydl.download(['https://www.youtube.com/watch?v=87Rlp41tFsE'])
 
24
  }
25
  # ydl_opts = { }
26
 
27
+ if os.path.exists(other_dir):
28
+ shutil.rmtree(other_dir)
29
+
30
  # os.environ['HTTP_PROXY'] = '"http://proxy.server:3128"'
31
  with yt_dlp.YoutubeDL(ydl_opts) as ydl:
32
  ydl.download(['https://www.youtube.com/watch?v=87Rlp41tFsE'])