Spaces:
Runtime error
Runtime error
Campfireman
commited on
Commit
•
c346c07
1
Parent(s):
17327d2
Update app.py
Browse files
app.py
CHANGED
@@ -11,11 +11,11 @@ from pytube import YouTube
|
|
11 |
global notify
|
12 |
notify = ""
|
13 |
global temp_addr
|
14 |
-
temp_addr = "YouTubeAudioGrabNTake/yt_download/" + str(datetime.datetime.now())
|
15 |
|
16 |
def clean_up():
|
17 |
-
os.rmdir("YouTubeAudioGrabNTake/yt_download/")
|
18 |
-
os.mkdir("YouTubeAudioGrabNTake/yt_download/")
|
19 |
|
20 |
def convert_video_to_audio_ffmpeg(video_file, output_ext="mp3"):
|
21 |
"""Converts video to audio directly using `ffmpeg` command
|
@@ -57,7 +57,7 @@ def extract_audio():
|
|
57 |
notify = "Sucess. Download request will be pulled up soon. "
|
58 |
|
59 |
def extrator_pipeline(url):
|
60 |
-
|
61 |
get_video(url)
|
62 |
extract_audio()
|
63 |
return notity
|
|
|
11 |
global notify
|
12 |
notify = ""
|
13 |
global temp_addr
|
14 |
+
temp_addr = "Campfireman/YouTubeAudioGrabNTake/yt_download/" + str(datetime.datetime.now())
|
15 |
|
16 |
def clean_up():
|
17 |
+
os.rmdir("Campfireman/YouTubeAudioGrabNTake/yt_download/")
|
18 |
+
os.mkdir("Campfireman/YouTubeAudioGrabNTake/yt_download/")
|
19 |
|
20 |
def convert_video_to_audio_ffmpeg(video_file, output_ext="mp3"):
|
21 |
"""Converts video to audio directly using `ffmpeg` command
|
|
|
57 |
notify = "Sucess. Download request will be pulled up soon. "
|
58 |
|
59 |
def extrator_pipeline(url):
|
60 |
+
clean_up()
|
61 |
get_video(url)
|
62 |
extract_audio()
|
63 |
return notity
|