Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
42 |
-
command.extend(['--sleep-interval', '10']) #
|
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()
|