Spaces:
Paused
Paused
Commit ·
df9c165
1
Parent(s): 14c0d7b
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,7 +2,7 @@ import streamlit as st
|
|
| 2 |
from streamlit_option_menu import option_menu
|
| 3 |
from youtube import youtube
|
| 4 |
from pornhub import pornhub
|
| 5 |
-
from other import cut_video, session
|
| 6 |
|
| 7 |
# Navigasi Sidebar
|
| 8 |
options = ['Youtube', 'Pornhub', 'Iwara', 'Mega', 'Rule34', 'Paipancon', 'Trailer']
|
|
@@ -22,14 +22,18 @@ if selected:
|
|
| 22 |
|
| 23 |
cut = st.checkbox("Potong Video")
|
| 24 |
if cut:
|
| 25 |
-
start_time = st.text_input("Start Time", value='00:07:12.
|
| 26 |
-
end_time = st.text_input("End Time", value='00:
|
| 27 |
|
| 28 |
if st.button(f"Download and Cut {selected}"):
|
| 29 |
video_file, judul_video, video_info = fungsi(video_link, resolution)
|
| 30 |
video_file = cut_video(video_file, judul_video, start_time, end_time)
|
|
|
|
|
|
|
| 31 |
session(video_info, video_file, cut)
|
| 32 |
else:
|
| 33 |
if st.button(f"Download {selected}"):
|
| 34 |
video_file, judul_video, video_info = fungsi(video_link, resolution)
|
|
|
|
|
|
|
| 35 |
session(video_info, video_file, cut)
|
|
|
|
| 2 |
from streamlit_option_menu import option_menu
|
| 3 |
from youtube import youtube
|
| 4 |
from pornhub import pornhub
|
| 5 |
+
from other import cut_video, session, convert_size
|
| 6 |
|
| 7 |
# Navigasi Sidebar
|
| 8 |
options = ['Youtube', 'Pornhub', 'Iwara', 'Mega', 'Rule34', 'Paipancon', 'Trailer']
|
|
|
|
| 22 |
|
| 23 |
cut = st.checkbox("Potong Video")
|
| 24 |
if cut:
|
| 25 |
+
start_time = st.text_input("Start Time", value='00:07:12.000')
|
| 26 |
+
end_time = st.text_input("End Time", value='00:07:31.000')
|
| 27 |
|
| 28 |
if st.button(f"Download and Cut {selected}"):
|
| 29 |
video_file, judul_video, video_info = fungsi(video_link, resolution)
|
| 30 |
video_file = cut_video(video_file, judul_video, start_time, end_time)
|
| 31 |
+
file_size = os.path.getsize(video_file)
|
| 32 |
+
video_info += f"Video '{file}' setelah diproses: {convert_size(file_size)}.\n"
|
| 33 |
session(video_info, video_file, cut)
|
| 34 |
else:
|
| 35 |
if st.button(f"Download {selected}"):
|
| 36 |
video_file, judul_video, video_info = fungsi(video_link, resolution)
|
| 37 |
+
file_size = os.path.getsize(video_file)
|
| 38 |
+
video_info += f"Video '{file}' setelah diproses: {convert_size(file_size)}.\n"
|
| 39 |
session(video_info, video_file, cut)
|