sudo-soldier commited on
Commit
7a5da51
·
verified ·
1 Parent(s): ae98033

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -38,12 +38,16 @@ def download_video(url):
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()
46
 
 
 
 
 
47
  if process.returncode == 0:
48
  video_filename = get_video_filename(output_path)
49
  if video_filename:
@@ -136,7 +140,6 @@ iface.launch(share=True)
136
 
137
 
138
 
139
-
140
-
141
 
142
 
 
38
  else:
39
  return f"Error: Cookies file {COOKIES_PATH} not found."
40
 
41
+ # Debugging: Print the command to see if cookies are added correctly
42
+ logging.info(f"Running command: {' '.join(command)}")
43
 
44
  process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
45
  stdout, stderr = process.communicate()
46
 
47
+ # Debugging: Print the output to help identify the error
48
+ logging.info(f"STDOUT: {stdout.decode()}")
49
+ logging.error(f"STDERR: {stderr.decode()}")
50
+
51
  if process.returncode == 0:
52
  video_filename = get_video_filename(output_path)
53
  if video_filename:
 
140
 
141
 
142
 
143
+
 
144
 
145