Update app.py
Browse files
app.py
CHANGED
@@ -600,13 +600,11 @@ async def multi_download(request: Request):
|
|
600 |
if is_youtube_url:
|
601 |
dl_url = get_youtube_download_url_from_apis(video_url)
|
602 |
if dl_url:
|
603 |
-
|
604 |
-
dl_url["requests_remaining"] = remaining_requests_value
|
605 |
-
return dl_url
|
606 |
else:
|
607 |
return {
|
608 |
"error": "Failed to Fetch the video."
|
609 |
-
}
|
610 |
'''encoded_url = urllib.parse.quote(str(video_url), safe='')
|
611 |
dl_url = f'https://chrunos-grab.hf.space/yt/dl?url={encoded_url}&{parameter}'
|
612 |
if dl_url and "http" in dl_url:
|
|
|
600 |
if is_youtube_url:
|
601 |
dl_url = get_youtube_download_url_from_apis(video_url)
|
602 |
if dl_url:
|
603 |
+
return {"url": dl_url, "requests_remaining": rate_limiter.max_requests - rate_limiter.get_current_count(user_ip)}
|
|
|
|
|
604 |
else:
|
605 |
return {
|
606 |
"error": "Failed to Fetch the video."
|
607 |
+
} '''
|
608 |
'''encoded_url = urllib.parse.quote(str(video_url), safe='')
|
609 |
dl_url = f'https://chrunos-grab.hf.space/yt/dl?url={encoded_url}&{parameter}'
|
610 |
if dl_url and "http" in dl_url:
|