Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -381,22 +381,10 @@ class AudioProcessor:
|
|
| 381 |
raise e"""
|
| 382 |
|
| 383 |
class VideoProcessor:
|
| 384 |
-
"""def __init__(self):
|
| 385 |
-
self.supported_formats = ['.mp4', '.avi', '.mov', '.mkv']
|
| 386 |
-
self.ydl_opts = {
|
| 387 |
-
'format': 'bestaudio/best',
|
| 388 |
-
'postprocessors': [{
|
| 389 |
-
'key': 'FFmpegExtractAudio',
|
| 390 |
-
'preferredcodec': 'mp3',
|
| 391 |
-
'preferredquality': '192',
|
| 392 |
-
}],
|
| 393 |
-
'outtmpl': 'temp_audio.%(ext)s'
|
| 394 |
-
}"""
|
| 395 |
def __init__(self):
|
| 396 |
-
self.
|
| 397 |
self.ydl_opts = {
|
| 398 |
'format': 'bestaudio/best',
|
| 399 |
-
'cookiefile': 'youtube.com_cookies.txt',
|
| 400 |
'postprocessors': [{
|
| 401 |
'key': 'FFmpegExtractAudio',
|
| 402 |
'preferredcodec': 'mp3',
|
|
@@ -404,7 +392,7 @@ class VideoProcessor:
|
|
| 404 |
}],
|
| 405 |
'outtmpl': 'temp_audio.%(ext)s'
|
| 406 |
}
|
| 407 |
-
|
| 408 |
|
| 409 |
|
| 410 |
def extract_video_id(self, url: str) -> str:
|
|
|
|
| 381 |
raise e"""
|
| 382 |
|
| 383 |
class VideoProcessor:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 384 |
def __init__(self):
|
| 385 |
+
self.supported_formats = ['.mp4', '.avi', '.mov', '.mkv']
|
| 386 |
self.ydl_opts = {
|
| 387 |
'format': 'bestaudio/best',
|
|
|
|
| 388 |
'postprocessors': [{
|
| 389 |
'key': 'FFmpegExtractAudio',
|
| 390 |
'preferredcodec': 'mp3',
|
|
|
|
| 392 |
}],
|
| 393 |
'outtmpl': 'temp_audio.%(ext)s'
|
| 394 |
}
|
| 395 |
+
|
| 396 |
|
| 397 |
|
| 398 |
def extract_video_id(self, url: str) -> str:
|