Fred808 commited on
Commit
fd6f122
·
verified ·
1 Parent(s): cd04c97

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -93,7 +93,8 @@ def batch_download_via_api(download_urls, download_dir=DOWNLOAD_DIR):
93
  api_url = "https://fred808-data1.hf.space/video/download"
94
  for url in download_urls:
95
  try:
96
- resp = requests.post(api_url, json={"urls": [url]}, stream=True)
 
97
  if resp.status_code == 200:
98
  # Try to get filename from Content-Disposition header
99
  filename = None
 
93
  api_url = "https://fred808-data1.hf.space/video/download"
94
  for url in download_urls:
95
  try:
96
+ # FIX: API expects {"url": ...} not {"urls": [...]}
97
+ resp = requests.post(api_url, json={"url": url}, stream=True)
98
  if resp.status_code == 200:
99
  # Try to get filename from Content-Disposition header
100
  filename = None