Spaces:
Runtime error
Runtime error
Commit ·
11957a2
1
Parent(s): 7141113
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
import streamlit as st
|
|
|
|
| 2 |
from pytube import Youtube
|
| 3 |
from youtube_transcript_api import YouTubeTranscriptApi
|
| 4 |
from moviepy.editor import *
|
|
@@ -26,7 +27,7 @@ def download_video(link):
|
|
| 26 |
|
| 27 |
#Download captions
|
| 28 |
srt = YouTubeTranscriptApi.get_transcript(link.split("=",1)[1])
|
| 29 |
-
filename = "
|
| 30 |
with open(filename, "w") as f:
|
| 31 |
# iterating through each element of list srt
|
| 32 |
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
+
import pytube
|
| 3 |
from pytube import Youtube
|
| 4 |
from youtube_transcript_api import YouTubeTranscriptApi
|
| 5 |
from moviepy.editor import *
|
|
|
|
| 27 |
|
| 28 |
#Download captions
|
| 29 |
srt = YouTubeTranscriptApi.get_transcript(link.split("=",1)[1])
|
| 30 |
+
filename = "1.txt"
|
| 31 |
with open(filename, "w") as f:
|
| 32 |
# iterating through each element of list srt
|
| 33 |
|