sudo-soldier commited on
Commit
c0b3064
·
verified ·
1 Parent(s): b5156e7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -38,9 +38,8 @@ def download_video(url):
38
  else:
39
  return f"Error: Cookies file {COOKIES_PATH} not found."
40
 
41
- # Add additional flags for throttling and retry
42
- command.extend(['--sleep-interval', '10']) # Delay between requests to avoid 429 errors
43
- command.extend(['--throttled']) # Add throttling to respect YouTube's rate limit
44
 
45
  process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
46
  stdout, stderr = process.communicate()
 
38
  else:
39
  return f"Error: Cookies file {COOKIES_PATH} not found."
40
 
41
+ # Add the sleep interval flag to delay between requests
42
+ command.extend(['--sleep-interval', '10']) # 10 seconds between requests to avoid rate-limiting
 
43
 
44
  process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
45
  stdout, stderr = process.communicate()