Update app.py
Browse files
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 |
-
|
|
|
|
| 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
|