Spaces:
Runtime error
Runtime error
Update Devine/platforms/Youtube.py
Browse files
Devine/platforms/Youtube.py
CHANGED
@@ -225,13 +225,13 @@ class YouTubeAPI:
|
|
225 |
thumbnail = result[query_type]["thumbnails"][0]["url"].split("?")[0]
|
226 |
return title, duration_min, thumbnail, vidid
|
227 |
|
228 |
-
async def
|
229 |
-
api_url = "https://
|
230 |
params = {
|
231 |
"query": url,
|
232 |
"format": "video" if video else "audio",
|
233 |
"download": True,
|
234 |
-
"api_key": "
|
235 |
}
|
236 |
|
237 |
async with httpx.AsyncClient() as client:
|
@@ -283,7 +283,7 @@ class YouTubeAPI:
|
|
283 |
return xyz
|
284 |
x.download([url])
|
285 |
return xyz
|
286 |
-
def video_dl(
|
287 |
temp_dir = tempfile.gettempdir()
|
288 |
xyz = os.path.join(temp_dir, f"{bitflow_info['videoid']}.{bitflow_info['ext']}")
|
289 |
url = bitflow_info['url']
|
|
|
225 |
thumbnail = result[query_type]["thumbnails"][0]["url"].split("?")[0]
|
226 |
return title, duration_min, thumbnail, vidid
|
227 |
|
228 |
+
async def get_video_info_from_ccndev(self, url: str, video: bool):
|
229 |
+
api_url = "https://ccndev.live"
|
230 |
params = {
|
231 |
"query": url,
|
232 |
"format": "video" if video else "audio",
|
233 |
"download": True,
|
234 |
+
"api_key": "J5zXWlEG2Cmz5c7cjJHkdoCCYGxtVRBc"
|
235 |
}
|
236 |
|
237 |
async with httpx.AsyncClient() as client:
|
|
|
283 |
return xyz
|
284 |
x.download([url])
|
285 |
return xyz
|
286 |
+
def video_dl(ccndev_info):
|
287 |
temp_dir = tempfile.gettempdir()
|
288 |
xyz = os.path.join(temp_dir, f"{bitflow_info['videoid']}.{bitflow_info['ext']}")
|
289 |
url = bitflow_info['url']
|